Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Game wont kick premium users?

Asked by 4 years ago

I was making a game where premium users were not allowed. I created a script that would kick premium users if they tried to join. Because i'm a premium user myself, I decided to test this. I played in studio and Roblox Player but the script didn't work. No errors in script analysis either. Also, i'm not that good at scripting. Here is the script:

--premium test
game.Players.PlayerAdded:Connect(function(player)
    if player.MembershipType == "Premium" then
        player:Kick("No Premium users allowed.")
    end
end)

0
I don't know why you would want it buy uh sure broham896 54 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
--premium test
game.Players.PlayerAdded:Connect(function(player)
    if player.MembershipType == Enum.MembershipType.Premium then
        player:Kick("No Premium users allowed.")
    end
end)

This should work

0
Beat me to it Raccoonyz 1092 — 4y
0
It works. Thanks! AbsurdAwesome101 56 — 4y
Ad

Answer this question