Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

BrickColor

Ok so I made a function script to that if a something touches a brick, then it makes another brick turn a different color, but I wont work so here is my script

function onTouched(hit)
	Workspace.Papi1.BrickColor = BrickColor.new("Institutional white") 
wait(0)
end
script.Parent.Touched:connect(onTouched) 

So if someone could reply with the correct script that would be great! Thanks

2 answers

script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
part = game.Workspace["Papi1"]
part.BrickColor = BrickColor.new("Institutional white")
end
end)

4 comments

0

Thanks man ill try it!

0

Thank you so much dude! It worked!!

0

No problem!

0

:d

I know why. Instead of Workspace put game.Workspace or workspace

This discussion is preserved as it was. New answers, comments, and votes are closed.