How to detect player that clicked a ClickDetector

Hi,

I made this button whenever it is clicked all players will be kick
and I wanted to make a notify all players in the server on who clicked
the click detector by putting a textlabel into a BillBoardGUI.

I wanted it to put the player name(the player who clicked the button) to
display it’s name in the billboardGUI

sadly I have no idea on how to make it display.

help

1 Like

Hey,

local Part = workspace.Part
local CD = Part.ClickDetector
local TextLabel = Part.BillboardGui.TextLabel
CD.MouseClick:Connect(function(plr) 
TextLabel.Text = plr.Name
end)
6 Likes

Click is not a valid event of Clickdetectors, did you mean MouseClick?

1 Like

thanks lemme test it out‎‎‎‎‎‎‎‎‎

Oh yeah I dont frequently work with them.
Thanks for pointing that out and @9c_Aw please edit your script to the new edit.

1 Like