Kick() not displaying message

I’ve been receiving frequent reports from people asking if they’ve been banned or not because they keep getting instantly disconnected from the server when they join. I looked into it and saw that they were in fact banned, but that the Kick() method wasn’t displaying the ban message to them. Instead it just shows “This server has shut down.” I double checked all my code, and in all instances of Kick() being used it’s supplemented with a message to be shown to the user.

This is just a hunch, but most times people see this is when they join a game and get kicked out instantly because their ban hasn’t expired. Perhaps it has to do with how quickly they’re being kicked from the server upon joining…?

4 Likes

I have a similar system where I kick the banned people instantly when they join with a message. I only handle it on the server (I assume you do too) but if you do handle it on the client it doesn’t display any message or the red box.

Does yours have the red box at the top but with the default message?

Yea, it’s showing up with the default “This serve has shut down.” message, the calls are being made from the server.

http://devforum.roblox.com/t/changes-to-kick/14844

Could it be that the server telling the client why they were kicked is taking longer than one second? I wouldn’t be surprised if that was the case when ROBLOX is loading in tons of stuff since the game is loading and the network is congested.

When using :Kick() on a player, the optional message argument is not displayed if the player is not past the "Joining Server" screen. This is especially problematic for games that utilize a ban list or similar feature, as players are consistently confused as to why they are being kicked.

In the following screenshots, this code is being run:

game.Players.PlayerAdded:Connect(function(p)
    p:Kick("Test Message")
end)

Code ran as above in studio, displays message immediatley as there is no loading screen:
Screenshot_3
Code ran as above in roblox, kicks player while they are "Joining Server", shows no message:
Screenshot_4

As discussed in this thread, it is technically possible to avoid this issue by waiting until the player has fully joined the game. For example, I can add a wait(60) before our Kick("Test Message") in the previous code, and it works as expected:
Screenshot_5
However, this is extremely unreliable as join time varies wildly on a per player basis. Using .CharacterAdded() also does not work, as the Character is added before "Joining Server" completes. There may be another way to check whether or not the "Joining Server" process has been completed, but if there is, I am unaware of it.

Version: 0.412.0.365788

This occurs for every user in every game.

6 Likes

Bumping this thread, cause this is a on going issue, whenever I’ve kicked players, and system has auto kicked them but it’s not giving the kick message.

3 Likes

Any solution to this? Already happening to me in June 2024. using Player:Kick(“Message”) but the message is not showing to the player that have been kicked.