So pretty much when the Players value gets set to athell the script doesn’t move the player to the hell spawn. Script is pretty self explanatory I would highly appreciate some help.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local Folder = Instance.new("Folder")
Folder.Parent = player
Folder.Name = "PlayerInfo"
local AtHell = Instance.new("BoolValue")
AtHell.Parent = Folder
AtHell.Name = "AtHell"
AtHell.Value = false
local CommandRunning = Instance.new("BoolValue")
CommandRunning.Parent = Folder
CommandRunning.Name = "CommandRunning"
CommandRunning.Value = false
player.CharacterAdded:Connect(function(character)
if player.PlayerInfo.AtHell.Value == true then
character:WaitForChild("HumanoidRootPart").CFrame = game.Workspace.HellTeleport.CFrame
else
character:WaitForChild("HumanoidRootPart").CFrame = game.Workspace.Spawn.CFrame
end
end)
end)