I'm currently making a 'Theme Park' game, and I've run into a bit of trouble with a tool game-pass script. I've tried multiple attempts and can't get it to work. Any help is widely appreciated. Heres my script:
local Lighting = game:GetService("Lighting")
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamepassId = 5053560 --Put that id here
local toolNames = {"InfinityRides"}
local toolsParent = Lighting
local function onPlayerAdded(player)
local function onCharacterAdded(character)
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId) then
for i = 1, #toolNames do
local tool = toolsParent:FindFirstChild(toolNames[i])
if tool then
local clone = tool:Clone()
clone.Parent = player.Backpack
end
end
end
end
if player.Character then
onCharacterAdded(player.Character)
end
player.CharacterAdded:Connect(onCharacterAdded)
end

6 comments
Did you see that I moved the tool into ServerStorage instead? No particular reason I just don't like having it inside of Lightning
Yes I did. Now it only shows "Checking"
Please give a link to your gamepass.
https://www.roblox.com/game-pass/5053560/Unlimited-Rides-PRE-ORDER
Do you have discord. So I can answer quicker.
Yes. enigma drew#9974