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

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

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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

0
ok.. LTRNightmare 66 — 4y
0
no I just checked its a gamepass website and i have the correct id LTRNightmare 66 — 4y
0
Did the error change? The error has the id "1308795" (Image) MacaylaMarvelous81 15 — 4y
Ad

Answer this question