I've tried to made a whitelist script. It seemed like a pretty easy task but as it showed up later, it isn't. The script kicks me even when my ID is on the script and I don't know why.
local whitelist = {
130021889 -- SpeedyTV_1
}
game.Players.PlayerAdded:Connect(function(p)
if p.UserId ~= whitelist then
p:Kick("Not whitelisted")
end
end)

3 comments
The second one worked, thanks.
Beat me to it lol
Accept my answer please