Add localplayer:Kick() (client kicks himself)

Currently the kick function is only available from the server.
But I would really need a good way to kick the client using localscript.

If I have a script that runs and notice that a remoteevent is missing and therefore wants to kick the client.
Then it will have to use a remoteevent to tell the server to kick the player. If all remoteevents are missing then the player wont be kicked.

Yes I could use a ping system, but those are more costly and can be replaced with a substituting hack.

localplayer:Kick() is simple and required.

Are you saying you want to kick the player if they haven’t received a RemoteEvent in a certain amount of time? Seems like the player would just be disconnected automatically if they were lagged out for too long. If it’s to deal with exploiters stopping RemoteEvents, they could just as easily stop the LocalScript from calling Kick().

1 Like

But… Player:Kick() already works on the client? (100% sure it did, would be weird if it doesn’t anymore)

Nope! :stuck_out_tongue: Documentation - Roblox Creator Hub

can’t edit the wiki, as I can’t login because some captcha.php stuff errors for me (forgot password, tried 3x)
NVM: the counter resetted, no captcha required anymore and I remembered my password for real this time

Yeah, I got it to work on the client too

1 Like

Oh:


No idea why that “Server-only” header note got added, so confusing.

2 Likes

Updated the wiki (removed the confusing “server-only” note and edited the Notes section so it mentions it only works on the local player from a LocalScript)

5 Likes

Thanks man!
Great job! :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.