First off, describe your issue.
I could easily say there's nothing wrong (although there is) so describe what problem are you having and what your goal is.
Second, indent your code and add a code block for the sake of simplicity.
Now, the quotes where it says
plr:Kick("Reason")
should not be there as they represent a string, for example:
local Message = "Hello world!"
print("Message")
would print "Message", and
local Message = "Hello world!"
print(Message)
would print "Hello world!".
Basically, with strings you are sending a string value, without you are sending an UserData value which could be an instance or a property as an example.
Now, why did you add
if
script.Parent function leftClick()then
Are you attempting to detect when a user clicks?
In that case they could just not left click at all and evade the ban.
A way better method is to detect when they join the game, using
game.Players.PlayerAdded
, stating
user
as the argument on the function, then detecting if the player that joined has the name of the one stated on the Text property, and if the value returns true, execute the ban.
For that you would use:
game.Players.PlayerAdded:Connect(function(user)
if user.Name == player then
end
end)
If I'm wrong or I didn't understand what you meant, please tell me. (also excuse my horrible indentation because im on mobile.
1 comment
its a gui to ban people for creators