I am making a script so when you walk inside a building it removes the fog (which I have completed) but the only issue is that it turn the fog off for everyone on the server. So I tried making it with LocalScript's and they did not work. Is there any other way to make this work. Also here are the scripts and everthing is placed in the workspace and the scripts are insde a part.
The off script:
function off() game.Lighting.FogEnd = 100000 end script.Parent.Touched:connect(off)
The on script:
function on() game.Lighting.FogEnd = 200 end script.Parent.TouchEnded:connect(on)
Unless you're using FilteringEnabled, I don't think there's a way to make this only work for one player.
you should make it so it triggers your player try this
player=game.Players.LocalPlayer
function off() game.Lighting.FogEnd = 100000-- Fog End makes it to a point where you cannot see your screen -- The best way to handle what you want is to make a GUI and cover your whole screen and the gui could be destroyed or remain end script.Parent.Touched:connect(off) -- function on() game.Lighting.FogEnd = 200-- right here could be your starting end script.Parent.TouchEnded:connect(on)