So for the past 3 hours, I have been trying to script the code I already connected to Trello, and everything only thing I'm having a problem with is scripting a gun spawner that connects to Trello like for example if a player says a command like "/sg deagle" and if they're in the Trello list it spawns in there inventory I am frustrated here's my script and if you have a fix to it please tell me.
local API = require(game.ServerScriptService:WaitForChild("TrelloAPI")) local SpawnersBoardID = API:GetBoardID("Gun Spawners Owners") local SpawnersListID = API:GetListID("SpawnerOwners",SpawnersBoardID)
function onChatted(message, player) local SpawnersCard = API:GetCardsInList(SpawnersListID) for _, Player in pairs(game.Players:GetChildren()) do for _, Card in pairs(SpawnersCard) do if message == "/sg deagle" and string.find(Card.name, Player.UserId) then if player.Limit.Value > 0 then game.ReplicatedStorage.FirearmsSpawners.Deagle:Clone().Parent = player.Backpack -- put all guns in a folder called "Firearms" in replicated storage player.Limit.Value = player.Limit.Value - 1 player.PlayerGui.SpawnerViews.Spawner.Enabled = true player.PlayerGui.SpawnerViews.Spawner.TextLabel.Text = "You have ".. player.Limit.Value.."/15 guns left to spawn!" wait(10) player.PlayerGui.SpawnerViews.Spawner.Enabled = false
elseif player.Limit.Value == 0 then
player.PlayerGui.SpawnerViews.Spawner2.Enabled = true
player.PlayerGui.SpawnerViews.Spawner2.TextLabel.Text = "You have no guns left to spawn"
wait(10)
player.PlayerGui.SpawnerViews.Spawner2.Enabled = false
end
end
end
end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChatted(message, player) end) end)

3 comments
How did you manage to get a piece of your code in code blocks and the rest not in code blocks. Please put the whole code in the code blocks so its easier to read!
This isn't an answer, but you should definitely not be using Trello. This information could be easily stored in a ModuleScript or Datastore if you want realtime updates. Trello is terrible as it frequently limits you and sometimes completely stops working.
I won't recommend using trello.