Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i kick everyone in the server exept for myself?

<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<>>>>>>>>>><

1 answer

To do this you'd need to use a loop:

local players = game:GetService("Players").PlayerAdded:Connect(function(plr)
plr = game.Players:GetChildren()
for i,v in pairs(plr) do
if v.Name ~= "IEntity_303I" then
v:Kick()

end)
end
end

5 comments

0

Ask me for any clarification, I haven't tested this out so I may be wrong

0

k

0

i fixed your script it didnt have enought ends :

0

enough<'

0

I only forgot to add 1 end, as I said before I didn't test it out.

This discussion is preserved as it was. New answers, comments, and votes are closed.