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

Why is my mace item for a gamepass not working? (Solved)

It's probably pretty simple and I made a mistake, but why doesn't this script work? it's in ServerScriptService and my mace is in Replicated storage, but if you have the gamepass, it doesnt clone into your inventory, why?

my code:

local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 8381290
game.Players.PlayerAdded:Connect(function(player)
	if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, 8381290) then
		local maceClone = game.ReplicatedStorage.SpikyStick:Clone()
		maceClone.Parent = player.Backpack
		print("Gamepass complete")
		end
	end)

1 answer

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