Creating a script that teleports to a certain position when a button is clicked

Hello :),
I don’t know if im really late or what the script you got is effecient but here is what i did to solve this problem.

local button = script.Parent

button.MouseButton1Click:Connect(function()
	local player = game.Players.LocalPlayer
	if player.Character then
		player.Character:MoveTo(Vector3.new("PartPos"))
	end
end)

let me know if this also helped.

1 Like

Thank you! I will test the script out and let your know. :grinning:

I don’t think it worked, but thanks for the effort to reply to my post. :grinning:

it works i tested it out before its probably just the way you have it setup. but np :slight_smile: