Gamepass script not working right

Hey,

Script:

local MarketPlaceService = game:GetService("MarketplaceService")

local GamepassId = 27382331 -- REPLACE 1234567 WITH YOUR GAMEPASS ID
local Tool = script.GravityCoil -- REPLACE GravityCoil WITH THE NAME OF YOUR TOOL

game.Players.PlayerAdded:Connect(function(Player)
		if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
			local ToolClone = Tool:Clone()
			ToolClone.Parent = Player.Backpack
		end
end)

It doesn’t give me the tool when joining, id is right and the clone should work as well. The tool is inside the script, and the script is in ServerScriptService.

Edit: Your script works fine for me, did you turn on your Perms?

1 Like

Yes, they are activated. Maybe it is because the script is in ServerScriptService and the Tool is inside the script?