Hello my Question is How i can teleport a Player in a Local Script?

Thats my current Script:

local player = game.Players.LocalPlayer
        
local owner = player.Name

local frame = script.Parent:WaitForChild("Frame")

frame.Button1.MouseButton1Click:Connect(function()
*Teleport Player to a specific Positon*
print(owner.." has clicked Button 1")

end)

frame.Button2.MouseButton1Click:Connect(function()
*Teleport Player to a specific Positon*
print(owner.." has clicked Button 2")

end)

3 comments

0

To teleport a player, you can use the Model function, SetPrimaryPartCFrame, so where you have Teleport Player to a specific Position you can write: player.Character:SetPrimaryPartCFrame(CFrame.new("Insert Position"))

0

i do not think you can from a local script.. only server scripts can alter workspace, use your local script in compination with a remote event or function and do the tp from server

0

MegaManSam1 its not working! :(