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 6 years ago
Edited 6 years ago

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

Thats my current Script:

01local player = game.Players.LocalPlayer
02         
03local owner = player.Name
04 
05local frame = script.Parent:WaitForChild("Frame")
06 
07frame.Button1.MouseButton1Click:Connect(function()
08*Teleport Player to a specific Positon*
09print(owner.." has clicked Button 1")
10 
11end)
12 
13frame.Button2.MouseButton1Click:Connect(function()
14*Teleport Player to a specific Positon*
15print(owner.." has clicked Button 2")
16 
17end)
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 — 6y
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 — 6y
0
MegaManSam1 its not working! :( RedstonecraftHD 25 — 6y

Answer this question