I've been trying to make this script work for a nice amount of time but I wasn't having any luck.
Button.Name = "Button"
Button.Parent = Base
Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Button.BackgroundTransparency = 0.900
Button.Position = UDim2.new(0.0368663594, 0, 0.284482747, 0)
Button.Size = UDim2.new(0, 200, 0, 50)
Button.Font = Enum.Font.Cartoon
Button.Text = "Tp To Your Base"
Button.TextColor3 = Color3.fromRGB(0, 0, 0)
Button.TextScaled = true
Button.TextSize = 14.000
Button.TextWrapped = true
Button.MouseButton1Down:Connect(function()
local player = game.Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:wait()
end
local hum = character:WaitForChild("Humanoid")
script.Parent.MouseButton1Down:Connect(function()
character:WaitForChild("HumanoidRootPart").Position = Vector3.new(623.33, 242.52, 213)
end)
end)

3 comments
Also you dont need an remote event since we are not refrencing the local player but if you want to use it then its okay
I think you'd need it since teleporting a character is too much of a job for a LocalScript.
nvm i fixed it