Need help with obby stage leaderstats

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

and this what i got in output

Workspace.MONSTERGAMES3609.DeathsBoard:6: invalid argument #3 (Instance expected, got number)

sorry for bad english its not my main langauge

dont focus on ends because this is not the all script but this part where i got proplems on it

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

player.RespawnLocation = path.to.instance.here

the problem in stage not in deaths

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

Then just do

player.RespawnLocation = workspace.YourFolder[tostring(stats.Stage.Value)]
-- This indexes the instance named "10" or "5" and sets it there

this is what i got in output

Expected SpawnLocation got Part for Player:RespawnLocation.

dont tell me i must make the part spawns because i have like 150 stage in my obby so its hard to change all the part with spawns

Don’t worry, you can use Reclass, an awesome plugin to convert everything to a spawn location.

bro i do it and player.respawnlocation changed to 3 but it dont spawn me on stage 3