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

Line 15 the end is underlined red ,why?

Asked by 5 years ago
Edited 5 years ago

local gamepass = script:WaitForChild("GamePassid") local service = game:GetService("GamePassService") game.Players.PlayerAdded:connect(function(player)end) if service:PlayerHasPass(player,gamepass.Value)then local tools = game.ReplicatedStorage:WaitForChild("Tools") for i,v in pairs(tools:getChildren())do if v:isA("Tool")then v:Clone().Parent = player:WaitForChild("Backpack") v:Clone().Parent = player:WaitForChild("StarterGear") end end end end)
2
You have an `end)` on line 4. lol TheeDeathCaster 2368 — 5y

1 answer

Log in to vote
0
Answered by
ABK2017 406 Moderation Voter
5 years ago

I believe you need to remove the GamePassService and replace it with the MarketPlaceService?

 local allow = (
        game:GetService('MarketplaceService'):UserOwnsGamePassAsync(player.userId, 1234567) -- GP id here
    )

    if allow then -- continue with script
Ad

Answer this question