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!
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