#teleporting a player to a part
35 messages · Page 1 of 1 (latest)
i dont have one yet because i dont know where to start
i saw another post about the same thing but it says to put that script in players service i dont know what player service is
like i said im very new
local Players = game:GetService("Players")
local TargetPart = game.Workspace.TeleportPoints.SellPart
local sellbutton = game.StarterGui.menu.sellbutton
if sellbutton.MouseButton1Click then
Players:MoveTo(TargetPart.Position)
end
this is the script i have under starterplayerscripts folder
should i create a remote event under replicated storage?
if so how do i define what that event is
and how do i call for it?
try with this
local Players = game:GetService("Players")
local TargetPart = game.Workspace.TeleportPoints.SellPart
local sellbutton = game.StarterGui.menu.sellbutton
if sellbutton.MouseButton1Click then
Players.Character.HumanoidRootPart.CFrame = CFrame.new(" here position")
end
@rustic canyon
only replace " Players:MoveTo(TargetPart.Position)" with "Players.Character.HumanoidRootPart.CFrame = CFrame.new(" here position")"
if u want targetpart.position but i recomended position like "143,94,03" exmaple*
yeah
ok let me see
ok its still not working
do i use a remote event or sumthing?
ive seen people use that
i just dont know how that works
@rocky osprey
or do i write a script under sellbutton to call for the script inside starterplayerscripts
** You are now Level 2! **
when the mouse is clicked
@rocky osprey hey you still here?
@rocky osprey hey man you think you could still help me out?
Im sorry im busy rn but in 4 hours i will help you