Hey there, I've recently tested my place and came across a problem: I've made a script that changes the outdoorambient and fogstart etc. for a cave. When I tested it with my friend both our outdoorambients got changed when only 1 person touched it, and the other was on the other side of the map.
I've tried using localscripts but then the script doesn't do anything, and I can't find anything on the wiki. Does anyone know how to solve this?
By the way here's the code I used to change the outdoorambient:
local lighting = game.Lighting
local Debounce = false
local Speed = 1
local function Tween(t,s,d,p,o)
return game:GetService("TweenService"):Create(o,TweenInfo.new(t,Enum.EasingStyle[s],Enum.EasingDirection[d]),p)
end
script.Parent.Touched:Connect(function()
if not Debounce then
Debounce = true
Tween(Speed,"Sine","InOut",{Brightness = 1,FogStart = 0,FogColor = Color3.fromRGB(191, 191, 191),OutdoorAmbient = Color3.fromRGB(127, 127, 127)},lighting):Play()
Debounce = false
end
end)

1 comment
what?