TP script problem

Hi,

I made this game where you run as fast as you can and win and you get to the next level
I made a shop where you can buy trails but there is something wrong about it
I wanted when the player click exit they will be teleported to the main spawn location

here is my script:

script.Parent.MouseButton1Click:Connect(function()
	humRP.Position = Vector3.new(84.544, 33.986, -862.193)
	BG.Visible = false
end)

--[[
humRP = player HumanoidRootPart
BG = shop GUI
]]

I provided a video I keep getting this weird glitch

please help :frowning:

1 Like

Maybe try unanchoring the Humanoid Root Part first?

Do not set the position of the HRP, use CFrame instead to reposition.

1 Like

well that was quick also thanks for the help I forgot about the CFrame :sweat_smile: