I don't even know how to try to do this, I'm quite new to scripting and I want it to enable fog whenever someone enters a certain area. I'm assuming it has to do something with checking the player position but then I don't know what to do with it.
Below is some code I found to locate player position. I don't know how to utilize it though.
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
print(Character.HumanoidRootPart.Position) -- This would just print the position, I don't know how to make a script that would detect an area of coordinates
end)
end)
For toggling of fog, I think it would have to be something like
if Character.HumanoidRootPart.Position == --(area) then
game.Lighting.Fog.Enabled = true
I just don't know how to make it detect an area other than listing every stud around the area (which would be excruciatingly painful)

1 comment
Thank you so much!