local teleportblock = game.Workspace:FindFirstChild("TeleportBlock") script.Parent.MouseButton1Down:connect(function(teleport) player.Character.Torso.CFrame = CFrame.new(teleportblock.Position) end)
I have this inside a TextButton
which is inside a SurfaceGui
. I know this doesn't work, but what I'm trying to figure out is how to get the player, so I can teleport them to a certain block in the game.
The only way to do this is to put the surface gui in playergui and adornee it to the part. This is good as you could use local scripts inside the surface gui.
Locked by NinjoOnline, Shawnyg, and User#5978
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?