Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to Teleport a player in a Local Script? [SOLVED]

Asked by 5 years ago
Edited 5 years ago

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)
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")) MegaManSam1 207 — 5y
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 goreacraft 1 — 5y
0
MegaManSam1 its not working! :( RedstonecraftHD 25 — 5y

Answer this question