So, in a game I'm making I have these different pads going into a tunnel with Touched scripts. How do I make it so that each pad going in turns your screen darker the deeper you go into it?
EDIT- This is the current script- What can I add to make the screen turn dark rather than the place? So that only the player that steps on a pad gets their screen blacked out?
function onTouched(Touch)
game.Lighting.Ambient = Color3.new((240/255), (240/255), (240/255))
game.Lighting.Brightness = 0.98
end
function Soundy(Part)
game.Workspace.Sound.Pitch = .98 -- Changing pitch of the song that's playing ingame
end
script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(Soundy)
If you don't understand what I'm saying, just comment so, and I'll try to rephrase.

5 comments
I'm getting an error with your script for the pads at line 4. https://gyazo.com/69c10df5ec6332dbc350457ae8193393
There's no errors or exceptions, but it doesn't actually make the player's screen darker. Am I placing something in the wrong place? Thank you for helping.
Well, I figured you'd know you have to set the frame's size to fill the entire screen: frame.Size = UDim2.new(1, 0, 1, 0).
I've never dealt with frames before, I'm also not very experienced in general. Can you explain more, if you don't mind, please?
nvm got it to work