So I'm making a game and I don't want the player to actually die or it'll break the game. (common problem with other games) So I made a script where when someone is under 5 health, they will be teleported to a sort of "death scene." But the script won't work. (I only did the part where you get teleported, I might make a new question will more script.)
player = game.Players:GetChildren()
playerfind = player:GetFullName()
wplayer = game.Workspace.playerfind
while true do
if player.Humanoid.Health > 5 then
wplayer.Character.Torso.CFrame = CFrame.new(-59.8, 0.5, 78.2)
end
end
Help?
