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

Game wont kick premium users?

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)

1 comment

0

I don't know why you would want it buy uh sure

1 answer

✓ Accepted answer
--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

2 comments

0

Beat me to it

0

It works. Thanks!

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