I am making a game in which players must escape from a monster, and I thought adding a boolvalue for each player to tell whether they have escaped or not would be a good idea.
However, I cannot figure out how to add the value to the folder when they join.
This is the code I have:
local player = game.Players:GetPlayers()
local EscapeValue = Instance.new("BoolValue")
EscapeValue.Name = player.Name
EscapeValue.Parent = game.ServerStorage.PlayerEscaped
EscapeValue.Value = false
Any help is appreciated.

1 comment
Thank you, this worked.