I am doing a game with my friends and part of it needs to know who pressed a button first. I don't need it on any fancy GUI or anything like that, I just want to know how you can make it so when someone clicks, the output states "(USERNAME) has clicked the button!".
COMMUNITY QUESTION
How do i make the output show who clicked a button?
1 answer
If it's a world object, insert a click detector into it. The first parameter of a click detector on function is the player that clicked the object.
ClickDetector.MouseClick:Connect(function(plr)
print(plr.Name.." has clicked the button!")
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Did you try any code?
Is this button a GUI or world object?
Do your own research before asking questions. There are hundreds of sources explaining this topic and even free code on the docs. Not only that, but this isn't a request site, you need to either try some code yourself, or make it clear you are asking for clarification on a complex topic. The site rules are here: https://scriptinghelpers.org/help/community-guidelines
Try using the :GetPlayerFromCharacter function.