So I made a boss fight game and if the player dies they can pay Robux to revive, I have the player respawn time set to infinite so they won’t respawn regularly but when I use a script to set it to 0 for a second to let them respawn they don’t. I have tried setting the respawn time to other numbers and the player health to numbers but nothing makes them respawn. is there a way to force a currently dead player to respawn?
Here is the button I had:
script.Parent.MouseButton1Click:Connect(function()
game.Players.RespawnTime = 0
wait(3)
game.Players.RespawnTime = "inf"
end)