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.

2 comments

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?

0

I'm not sure how to do that exactly. I have very limited knowledge on scripting and I'm slowly learning.