Hi, I'm trying to do something within a horror game I'm making. Since the server is 5 players, I want to make it so if the player is in a specific part, It will raise the FogEnd amount.
Would it be something like this at the start?
local players = game:GetService("Players") script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then local player = Players:GetPlayerFromCharacter(hit.Parent) -- Mainly the Code to access Client Fog. end end
Thanks for helping if you do decide to help with this. ¯_(?)_/¯
local players = game:GetService("Players") script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then local player = Players:GetPlayerFromCharacter(hit.Parent) game.Lighting.FogStart = (values here) game.Lighting.FogEnd = (values here) end end
You'd want the code in a local script in StarterPlayerScripts and simply just run whenever a client touches a said brick and then it causes lighting the change simply on the clients end, hopefully this works (Also remove the brackets)