Simple but my brain is tiny: How can I script a textbutton to move a player to a different position coordinate?

Not much else, but if screenshots are needed I can provide. Thanks for the support!

use .MouseButton1Click on the TextButton and move the player by doing

player.Character.PivotPosition = -- set position
1 Like

Thanks! It worked! ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

1 Like
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local hmr = character:WaitForChild("HumanoidRootPart")
local textButton = script.Parent

textButton.MouseButton1Click:Connect(function()
	hmr.CFrame = CFrame.new(0, 0, 0)
end)

Local script, place inside the “TextButton” instance itself, don’t forget to mark a post as the solution once a correct solution has been provided.