So basically when the person steps on the brick it should teleport them to the next stage but instead, it teleports them to the middle of the baseplate. Why?

script.Parent.Touched:Connect(function(hit)
	local hum = hit.Parent:FindFirstChild("Humanoid")
	if hum ~= nil then
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		player.leaderstats.Stage.Value = player.leaderstats.Stage.Value + 1
		local newstage = player.leaderstats.Stage.Value
		local newcheckpoint = workspace["Checkpoint "..newstage].Position
		hum.Torso.CFrame = CFrame.new(Vector3.new(newcheckpoint))
	end
end)

5 comments

0

Check the baseplate's name, additionally you might want to add '+Vector3.new(0,5,0)' after newcheckpoint) at line 08

0

Nope. It didn't work. Also, the baseplate's name is 'Baseplate'.

0

Line 8, CFrame.new(newcheckpoint + Vector3.new(0,5,0)) newcheckpoint is already a vector3 since it's a position value

0

Line 8, CFrame.new(newcheckpoint + Vector3.new(0,5,0)) newcheckpoint is already a vector3 since it's a position value

0

Thanks!