so i want to make if player die spawn in stage.value
This my script
local player = game.Players.LocalPlayer
local PetGui = game.ReplicatedStorage.PetGui
local stats = player:WaitForChild("leaderstats")
player.character.Humanoid.Died:connect(function()
player.leaderstats.Deaths.Value = player.leaderstats.Deaths.Value +1
player.RespawnLocation = stats.Stage.Value
Right now, player.leaderstats.Deaths.Value is just a number, and RespawnLocation requires the Instance (AKA the part) of where to spawn. So use player.leaderstats.Deaths.Value to find the specific part where you want the player to spawn, and then do
i want if player die respawn in same stage as the stage value so if player.stage = 10 player respawn in stage then and i put all the stage in workspace in folder and i name it 1 2 3 4 etc