--serverscript
game.ReplicatedStorage.Dead.OnServerEvent:Connect(function(player)
if char then
print("good")
if hum then
print("better")
print("very cool")
local code = game["Teleport Service"]:ReserveServer(18444570244)
local tps = game:GetService("TeleportService")
tps:Teleport(18458228451)
end
end
end)
--local script
local able = true
game.runservice.renderstepped:Connect(function()
if hum.Health <= 0 then
if able == true then
able = false
game.ReplicatedStorage.Dead:FireServer()
end
end
if hum.Health <= 100 and hum.Health > 0 then
able = true
end
end)
I have tried tps:Teleport(), and tps:TeleportAsync(), but nothing works