How do make the fog change for one player instead of the whole lobby

The function should give you a variable for the part that touched, check if the name of the parent of that part is equal to the local player’s name

Example:

local brick = game.Workspace.FogPart
local localPlayer = game.Players.LocalPlayer

brick.Touched:Connect(function(pt)
	if pt.Parent.Name == localPlayer.Name then
		game.Lighting.FogEnd = 50
		game.Lighting.FogColor = Color3.new(0, 0, 0)
	end
end)
1 Like

Thanks I will try it out later and tell u if it works