So ive got like 0 lua experience...know nothing but slowly trying to make an rpg for fun and learning bits of lua on the way.
so today ive run into something with fog
ive got multiple levels in my game for example desert and swampy, and i want them each to have their own fog/view distance....i have the ontouched script so when somone touches a brick it changed the fog level...problem is its not local so im pretty sure it would change it for everyone all over the game.
the script is
function onTouched(hit) game.Lighting.FogEnd = ("500") end script.Parent.Touched:connect(onTouched)
someone said to make it a local script...but when i looked up how to use a local script i couldn't think of a way to do it :/....i need this to run when the player touches a brick and for them to be the only one who sees it....so someone can be in my desert map and see 1000 fog and someone be in my swampy map and see 250 fog. if someone could walk me through it i would very much appreciate it :)