Script apparently runs through, but doesn't work

game.Players.PlayerAdded:Connect(function(p)
	local leaderstats = p:WaitForChild("leaderstats")
	local stage = leaderstats:WaitForChild("Stage")
	p.CharacterAdded:Connect(function(c)
		c.HumanoidRootPart.Position = workspace.Stages:WaitForChild(tostring(stage.Value)).Position + Vector3.new(0, 3.5, 0)
		print("nonpj")
	end)
end)

Basically, it’s supposed to spawn you at the stage’s spawn, just 3.5 studs above it so the character doesn’t get stuck. It does indeed print “nonpj”
image
However, my character doesn’t spawn above the spawn.

Any help is appreciated.

1 Like

I’ve had this issue a while back as well. The solution should be adding a wait time (recommended 3-8 seconds) before moving the player.

.CharacterAdded fires when the playermodel is added into the workspace, not when the playermodel’s parts are all in. You can also try a p:WaitForChild("HumanoidRootPart") but I doubt it will work.

1 Like

Ok, it works, but now the character model isn’t even visible.

Try increasing the wait time if it is under 5 seconds and increase the Vector3.Y to 5. Otherwise, check the output for errors.

No, I just found out that the character is loaded, but is floating.
image

Try using .CFrame instead of .Position

game.Players.PlayerAdded:Connect(function(p)
	local leaderstats = p:WaitForChild("leaderstats")
	local stage = leaderstats:WaitForChild("Stage")
	p.CharacterAdded:Connect(function(c)
		c:WaitForChild("HumanoidRootPart").CFrame = workspace.Stages:WaitForChild(tostring(stage.Value)).CFrame + Vector3.new(0, 3.5, 0)
		print("nonpj")
	end)
end)

This has never happened to me, it could be that there’s a part there. Forcing the player to go to the top of that part. Also is the camera being manipulated? Try @OsanaRumia 's suggestion too. I had just realized it was .Position.