I want to try to change someone’s lighting settings so there is only fog for 1 person. I have tried
local player = game:GetService("Players").LocalPlayer
local function onPartTouch(otherPart)
player.lighting.fogend = 10
lighingpart.Touched:Connect(onPartTouch)
how would i make it so it changes only 1 persons fog?
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 = 10
end
end
-- Change path to LightingPart
LightingPart.Touched:Connect(OnTouched)