Tool cloning issue

So this may just be a bonehead mistake but I cannot figure out for the life of me why this tool isn’t cloning. I marked the possible lines that are causing issues below.

local TrelloAPI = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local BoardID = TrelloAPI:GetBoardID("Records")

local ListID = TrelloAPI:GetListID("GunLicense",BoardID)

	print("player joined")
	local Cards = TrelloAPI:GetCardsInList(ListID)
	for v,i in pairs(Cards) do
		if == then
			local tool = script.GunLicense:Clone() -- line in question
			tool.Parent = player.Backpack -- line in question
			print("localplayer has license")
			warn('localplayer doesnt have license')

print out each the cards table so I can see what your are looping through

you are sure its not going into the backpack? I would check the explorer since everything here looks good

Don’t player added functions only work in game?

they do but sometimes doesnt due to studio loading in the player before the server scripts. In this case its fine though since its clearly printing localplayer has license hence why im asking if your sure its not there.

I get zero output when in studio except for plugin stuff.


If you go to the Test tab, there is a button called Start that looks like a server in the middle called Clients and Servers. Then there is a drop down bar that says 1 Player. Switch it to 2 players and then start the server. If there is still nothing printing on the server, its probably because your Cards list is empty.

then what did you just send me? The image clearly has output

That is in the actual game, not studio.

Try doing this:

local toola = script.GunLiscense:Clone()
         local toolb = script.GunLiscense:Clone()

    toola.Parent = player.Backpack

            toolb.Parent = player.StarterGear

Thank you very much we are working now!

1 Like