Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to fix a Game Pass Entrey Script?

Asked by
iNykoda -1
13 days ago

So i got help a bit with the following script.

game:GetService("Players").PlayerAdded:Connect(function(Player)
    local MarketPlaceService = game:GetService("MarketplaceService")
    local GamepassID = 5761882 -- Put your gamepass ID

    if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) == false then -- If player does not own the gamepass
        Player:Kick("Car Slot Game Pass is Mandatory") -- Kick the player with the specified reason.
    end
end)


but when i put it into a script in the workplace and open the game to new servers it still lets people without the game-pass enter.

0
Your script needs to be a normal script not a local script AidanTES -6 — 13d

1 answer

Log in to vote
0
Answered by
Isaque232 171
13 days ago
Edited 13 days ago

Hello, Just tested the script and it worked perfectly fine, the only error that is going through my head is that your script might be a localscript, make sure that It's a serverscript since localscripts shouldn't work in workspace, Make sure to read the LocalScript Article as It'll definitely help you with localscripts issues and prevent you from making errors with them!

0
I just relized i needed to update the servers. Thanks! iNykoda -1 — 13d
Ad

Answer this question