I’m making a fog script so that if a player touches a part the fog for ONLY them changes.
local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local function OnTouched(Touched)
local Player = Players:GetPlayerFromCharacter(Touched.Parent)
if Player and Player == LocalPlayer then
Lighting.FogEnd = 10000
end
end
game.Workspace.LightingPartTriger.Touched:Connect(OnTouched)
However when touched the fog does not change at all could someone help me?