Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to change ambient when touching a part?

Asked by 8 years ago

I've made a part and put this script into it,

function onTouched(Touch)

game.Lighting.Ambient = Color3.new((200/255), (200/255), (200/255))

end

script.Parent.Touched:connect(onTouched)

but it doesn't change the ambiance when I step on it in game. I tried using game.Lighting.Ambient = (200, 200, 200), but that doesn't work either. Does anybody know what to do to make this work? Thank you for reading.

0
What do you mean by "Doesn't work"? Is there any error? Have you done any debugging to make sure this script is running and that the event is happening? BlueTaslem 18071 — 8y
0
I'm not sure how to do that exactly. I have very limited knowledge on scripting and I'm slowly learning. jasonr95 5 — 8y

Answer this question