for i, v in pairs(game.Players:GetPlayers()) do
    v:Kick()
end

I tested this out in studio and in roblox in game. No one gets kicked. This script is on the server side.

5 comments

0

Try a RemoteEvent

0

That's not what I want to use.

0

Very broad question, did anything error? Is this script actually waiting for players to join before running this loop?

0

You aren't providing much context here...Is this all that's in the script?

0

This is likely running before any players actually join the game. I recommend having this kind of thing run on an event so that you can test it.