So I want to make a brick change color when someone steps on it and i cant get it to work I have tried this
1 | when onTouch(hit) |
2 | function |
3 | Light.Color = Color 3. new( 255 / 255 , 0 / 255 , 0 / 255 ) -- Red |
4 |
5 | end |
6 | end |
Will someone help?
I suggest learning more on how to script on the Roblox Wiki, as that is not how you use a function correctly.
1 | script.Parent.Touched:Connect( function () --When the part is touched |
2 | script.Parent.Color = Color 3. new( 255 / 255 , 0 / 255 , 0 / 255 ) --Change the parts color |
3 | end ) |
Please accept my answer if this helped!