so im making an RPG and i know pretty much nothing about lua :/ using free scripts form model shop and i found this for fog/view distance
if true then
game.Lighting.FogEnd = ("1000")
end
works perfect but how can i make it change for somone when they touch a brick.
to set the scene i have a desert level so i want the fog set at 1000 but when they enter my swampy level is there a way so when they touch a brick it sets their fog to say 250? so that it simulates a swampy foggy hardish to see landscape
sorry for not knowing much :/
ok update......i now have this script attached to a basic brick as a place holder....
function onTouched(hit)
game.Lighting.FogEnd = ("1000")
end
script.Parent.Touched:connect(onTouched)
it works fine but correct me if im wrong...but wouldnt this when touched change the fog for EVERYONE?
how would i localize this script to make it change the fog for just the guy who touched it? so somone in my desert level sees at 1000 and the guy in the swamp sees 250?
put that in a local script.