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. ¯_(?)_/¯

1 comment
You could do it that way, but I would probably detect if they are in the area by checking the distance they are away from a designated point. I believe you would then want to clone in a localscript to the target player and have this localscript adjust the FogEnd