I tried to make a script that teleports player if player is alive, but it doesn't teleport at all.
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
if hit.Health > 0 == true then
hit.Parent:MoveTo(game.Workspace.Spawn1.Position)
end
end
end)
