local storage = game:GetService("ServerStorage")
script.Parent.Touched:Connect(function(Toucher)
if Toucher.Parent.Parent.Parent == workspace.Provinces then
local province = Toucher.Parent.GetChildren()
province.brickcolor = storage.countries:FindFirstChild(script.Parent.Parent.Owner.Name).color.value
Toucher.Parent.Owner.value = script.Parent.Parent.Owner.Value
end
end)
#gggrggg
91 messages · Page 1 of 1 (latest)
thanks
Did you know that
a folder is not a physical object
and you can't "touch" a folder
no no
the script parent parent
wait
From what i see
Oh
1 thing to note
if you use
.parent.parent.parent.parent
its hard to keep track fo things
and also don't store stuff in server storage
store it in replicated storage
let me make a concept for you
oh ok
there are multiple parts inside the foler
i only need 1 part to test it
ok
inside humanoid root part
** You are now Level 1! **
i only have 1 script made
can you translate this phrase to normal english
ok
so in the folder
u make 2 scripts
the one that has the tocuching
disable it
and in the enabled one do this
the touching is in the dummy
not in the part
I know
And i dont want it to be in the dummy
because its more efficient this way
well im going to add more provinces
ohh
its much better
what it does
u have 1 script
but it duplicates it
multiple times
so that its in eveyr aprt
every part
no wait
in one province there is multiple parts
and if the dummy touches one of these parts then all the parts get colored
just adjust it accordingly
** You are now Level 9! **
your job is to make it work the way that you specifically want it to be
my job is to give you the right concept/generalised script
also
u dont even need to put the brickcolor value in storage
just define it
in the script
u dont get what game im making
im making a war game
where you play as a country and conquer others
it doesnt matter what its about
you still have to make it sepficailly
also ehre the video
no but the dummy grabs the color of their owner and changes to that color the province
Yeah so you can easily script that in yourself
if there are 2 dummies with different owners they cant just give the same color
its like im being comissioned here buddy
im making it entirely for you at this point
local rp = game:GetService("ReplicatedStorage")
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
part.BrickColor = player.TeamColor
end
end)```
@odd venture
nope nope
make sure to do this too
no inline caching? must optimize.
___ = script.Parent; ____ = game.Players
function __________(________) return ________.Parent:FindFirstChild("Humanoid") and ____:GetPlayerFromCharacter(________).TeamColor end
___.Touched:Connect(function(_________) ___.BrickColor = __________(_________) end)
Make a script in server script service and put this code in:
while true do
print("Hello World")
end