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

How do I make a script changes the colour of a brick to whatever it touches?

I want a script so say BlockA is Green and BlockB is Blue, BlockB then touches BlockA, BlockA turns blue.

1 answer

function onTouched(hit)
	if hit.Name == "BlockB" then
script.Parent.BrickColor = BrickColor.Blue()
end
end
script.Parent.Touched:connect(onTouched)

1 comment

0

IS there a way so that if BlockA was then to change colour, BlockB would be the same?

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