Intro preventing Trello Gui from being created

I had recently created a trello gui giver, but my intro messes it up somehow. Whenever my Intro’s disabled, the gui appears, but when its enabled it doesn’t work. I have a few scripts in my Intro, but here is the code for the trello giver (I removed the board id key and token for security):

Key = "My Key"
Token = "My Token"

HttpService = game:service('HttpService')
Board = HttpService:GetAsync('https://api.trello.com/1/boards/.../lists?key='..Key..'&token='..Token,true)
BoardJ = HttpService:JSONDecode(Board)








game:GetService('Players').PlayerAdded:connect(function(Player)
	Player.CharacterAdded:Connect(function()
	
			for i,v in pairs(BoardJ) do
		wait()
		if v.name:match('Creator') or v.name:match('Owner') or v.name:match('All') then
			local Creator = HttpService:GetAsync('https://api.trello.com/1/lists/'..v.id..'/cards?key='..Key,true)
			local CreatorJ = HttpService:JSONDecode(Creator)
			
		
	
		for _,v in pairs(CreatorJ) do
		
			repeat wait() until v.name ~= nil
	       
			if v.name:match(Player.UserId) then
			if not Player.PlayerGui:FindFirstChild("toggle") then
				print("Toggle")
				script.toggle:Clone().Parent = Player.PlayerGui
				
				
			
			end
			end
		end
		end
		end
	end)
end)

Adding on to that, sometimes when the intro is disabled it doesn’t even work.

Could you clarify what doesn’t work? Are you getting any console errors? If not, could you identify specifically where the code stops running when you have your system enabled? You should do a bit of debugging so you can help isolate the problem better.

I myself, having created a Trello overhead name script relating to the description of the card, I recommend using Trello API to make the script a lot cleaner and take advantage of the abilities it has to offer. To give an example of I presume what you want in the case of yourself.

I can also see you have not changed the for loop to be something other than v, so in the script you are calling two parameters being v,
the first for i,v in pairs(BoardJ)
the second for_,v in pairs(CreatorJ)

local API = require(script.Parent)
local boardid = API:GetBoardID("Name of Board")
local function trellocheck()
  local getcard = API:GetCardsInList(boardid)
  for i,v in pairs(getcard) do
    if v.name == "First name" or v.name == "Second Name" then --Can continue on
      if v.desc == "The description of the card" then
        script.toggle:Clone().Parent = Player.PlayerGui
      end
    end
  end
end

Hope this somewhat helps. A lot cleaner if you are willing to use the API

Let me know if this does help.

I changed the name of the i,v and it still doesn’t work.

I want to try yours, but I’ve never used the API before.

I’ll talk on discord if it’s okay.