Player:Kick() not working?

Real roblox server.

This just happened to me too when I tested!
It is a Roblox bug, I think we should let them fix this error.

Save the game locally to a file try running it from that file.

Isn’t the point that it doesn’t work on a real server? I don’t see why they should run it locally.

If it is a Roblox error then moving the script to a new game or saving it locally would fix the problem otherwise it’s a scripting problem, I still don’t have the full context so I can’t tell exactly what’s going on.

1 Like

It works! but why real server don’t kick player?

This seems like a roblox problem, especially as it works in studio for them.

2 Likes

It’s a roblox error, just save the game to a new place and it’ll work on roblox.

1 Like

I tried it. It didn’t work.

It is a Roblox error, I suggest just giving it some time until they fix it.

1 Like

Make sure you’re publishing to a completely new place, try again in a day and it could work.
Consider posting it as a bug in the engine bugs.

1 Like

With help from a remoteEvent, Yes.

No, server kicking by itself is just fine.

Doesn’t work for me.

player:Kick only work in localscripts for me.

Are you calling it wrong?

This always works:

game.Players.PlayerAdded:Connect(function(plr)
    if plr.Name == "YouSuck" then
        plr:Kick("See? No bad usernames")
    end
end)

I’m not always using PlayerAdded.

But I know PlayerAdded works fine for it.

1 Like

Well there’s the problem, you need to retrieve the player correctly.

2 Likes

Same thing was happening to me, I eventually found out what was wrong (well atleast for me).

Turns out, TeleportService:SetTeleportGui() is what was causing it (like i said before, for me.)

3 Likes

Though you can’t spoof the player argument from the one who sent it, you can also just have a whitelist for who is allows to be able to kick, you shoudn’t have an issue with that.

Resolved as a result of disabling TeleportGui!
I’m going to submit a bug report about this.

Thank you very much!

1 Like