The stage script is fully functional, no problems whatsoever. However, whenever I die I spawn at the very beginning instead of the stage you're supposed to be on. Any help is appreciated! :)
Here is the script for the stages
local Players = game:GetService("Players")
local Levels = workspace.Levels
Players.PlayerAdded:Connect (function(plr) local leaderstats = Instance.new("Folder") leaderstats.Parent = plr leaderstats.Name = "leaderstats"
local Level = Instance.new("IntValue")
Level.Name = "Level"
Level.Value = 0
Level.Parent = leaderstats
end)
for i = 1, #Levels:GetChildren() do local CurrentLevel = Levels:FindFirstChild(tostring(i)) CurrentLevel.Touched:Connect (function(part) local Player = Players:GetPlayerFromCharacter(part.Parent) if Player then if (Player.leaderstats.Level.Value + 1) == i then Player.leaderstats.Level.Value = i elseif Player.leaderstats.Level.Value < i then Player.Character.HumanoidRootPart.Position = Levels:FindFirstChild(tostring(Player.leaderstats.Level.Value)).Position + Vector3.new(0,3.5,0) end end end) end

2 comments
Could you include the scripts that deal with respsawning and/or the stages?
Sure! I just updated it.