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

trying to give a tool to someone who bought the gamepass i dont know how to fix this help?

TIME:TIME:TIME- GamePassId '1308795' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead. I dont know how any of this works! heres the script

gps = game:GetService("GamePassService");


Tools = {"keycardL2"} -- Exact text--

Respawn_With_Tools = true;  -- False if you don't want the people spawned with it.
--MAKE SURE YOU PUT THE TOOLS IN THE LIGHTING
id = script:WaitForChild("GamePassID"); -- Do not change
game.Players.PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
if gps:PlayerHasPass(Player , id.Value) then
for i,v in pairs (game.Lighting:GetChildren()) do
for a,c in ipairs (Tools) do
if v:IsA'Tool' and v.Name:lower()==c:lower() then
adminTool = v:Clone()
if Respawn_With_Tools==true then
adminTool.Parent=Player.StarterGear
adminTool:Clone().Parent=Player.Backpack
elseif Respawn_With_Tools==false then
adminTool.Parent = Player.Backpack
end
end
end
end
end
end)

i got this online

1 answer

That is not a game pass, that is an Image. Change your ID in your value.

3 comments

0

ok..

0

no I just checked its a gamepass website and i have the correct id

0

Did the error change? The error has the id "1308795" (Image)

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