You could try to use :WaitForChild(stage.Name +1) , as I think you’re currently trying to add to an instance. You could also use :LoadCharacter() to respawn them. For the prompt error, could you elaborate more, as currently there isn’t much information except that it breaks. Also, for a skip stage it should be a developer product, not a gamepass.
local remote = game:GetService("ReplicatedStorage")
local remote1 = remote:WaitForChild("SkipStage")
local teams = game:GetService("Teams") -- I removed the :GetChildren() so I could use WaitForChild later.
remote1.OnServerEvent:Connect(function(player)
local stage = table.find(teams:GetChildren(), player.Team)
player.Team = teams:WaitForChild(tostring(tonumber(player.Team.Name) + 1)) -- .Name and tostring need to be used because otherwise you'll be attempting to perform a calculation on an instance.
player:LoadCharacter() -- Respawns the player so they teleport to the next stage.
end)
All of you Guys were right. Thank you so much for your help. it seems as though I was just missing a function to actually teleport the player, it was not there at all.
And as far as the gamepass not working, a player did remind me that skips are not by way of gamepasses which i completely did forget. Thank you everyone for all of your input. I’ve learned to use a new function today.