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)
--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