Hi, developers! I’m extremely new to this stuff, and I’m having some trouble with my script:
So I want to kick a specific player that clicks on a specific TextButton within a frame. For some reason though, my code (in a LocalScript within the TextButton) isn’t working:
local plr = game.Players:GetPlayers()
script.Parent.MouseButton1Down:Connect(function()
plr:Kick("You have been kicked for not accepting the rules.")
end)
I looked in the “Player:Kick” page of the Developer Hub, but couldn’t quite comprehend it. Any help?