Like the title says,how to do a script that will kick you with a message, when you clicked on a button?
So when a local player/ player clicks on the button in a GUI, he gets kicked with a message on top, you know what I mean. The red message on top.
Thanks.
EDIT: Still have no luck, will this do?
button.onMouseButton1Click:connect(function()
game.Players.localplayer:Kick("You have been kicked for exploiting!")
Or did I mess up on something? Please tell me! Thanks!
EDIT: Accepted the working answer, thanks a lot all of you guys who helped me! ;) Made my day and it's just what I wanted! :D

2 comments
You already have the player in the first OnServerEvent parameter. You can simplify line 5 just by doing 'player:Kick()'. You should never get the player using FindFirstChild ever.
Works! Thanks, both of You! ;)