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

How to make teleport button on a sign?

Asked by 5 years ago
Edited 5 years ago

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!

0
could you show the full script? raid6n 2196 — 5y
0
why? that is all that is neccessary i believe JoRyJuKy 32 — 5y
0
Could i use Activated as an event? JoRyJuKy 32 — 5y
0
fine, to make sure is this a gui button or no? raid6n 2196 — 5y
0
use click detector HappyTimIsHim 652 — 5y

1 answer

Log in to vote
0
Answered by
ryan32t 306 Moderation Voter
5 years ago

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
Ad

Answer this question