Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make teleport button on a sign?

Hello, so I was wondering how I could acheive a thing. The thing is I have a sign, with a text button on a surface GUI. I was wondering, how can I check which player is clicking the button. I need to teleport that player. Here is the current script:

Button.MouseButton1Click:Connect(function()
	
end)

I dont need help with the teleporting, I just wanna know how to get the player that clicks the button when the button is clicked. Thanks!

5 comments

0

could you show the full script?

0

why? that is all that is neccessary i believe

0

Could i use Activated as an event?

0

fine, to make sure is this a gui button or no?

0

use click detector

1 answer

✓ Accepted answer

Local Scripts do not work in Workspace.

MouseButton1Down Event does not give you the Player.

To achieve your goal, you need to make a Local Script in StarterGui. But this time you have to find the TextButton in Workspace. Then you can grab the player by using,

Game.Players.LocalPlayer

This discussion is preserved as it was. New answers, comments, and votes are closed.