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

When I play the game and update the board in game, it doesn't show it on trello. Why?

The script down below is a what I've been working with but also with other scripts too.

ap = require(game.Workspace.TrelloAPI)
BoardID = ap:GetBoardID("DCCC Voting Board")
ListID = ap:GetListID("Voting On", BoardID)
CardName = game.Workspace.TextBoard.SurfaceGui.MainText.Text
CardID = ap:GetCardID(CardName, BoardID)
---------

script.Parent.MouseButton1Down:connect(function()
	CardID = ap:AddCard(CardName, "Voting is in the Comments", ListID)
	local hint = Instance.new("Hint", workspace)
		hint.Text = "Trello Card Created for Bill: " .. CardName
		wait(3)
		hint:Destroy()
end)

I'm trying to change the CardName to whatever I changed onto the board. Can someone help me.

1 answer

✓ Accepted answer

Your CardName variable records the value of the Text property when the script is first run; it doesn't change when (what I assume is) the TextBox changes. This can be remedied by changing the CardName variable to reference the object itself, and using CardName.Text in the rest of the script:

local ap = require(game.Workspace.TrelloAPI) --// Usage of local variables is recommended.
local BoardID = ap:GetBoardID("DCCC Voting Board")
local ListID = ap:GetListID("Voting On", BoardID)
local CardName = workspace.TextBoard.SurfaceGui.MainText --// Reference the object.
local CardID = ap:GetCardID(CardName, BoardID)
---------

script.Parent.MouseButton1Down:connect(function()
    CardID = ap:AddCard(CardName.Text, "Voting is in the Comments", ListID)
    local hint = Instance.new("Hint", workspace)
    hint.Text = "Trello Card Created for Bill: " .. CardName.Text --// Index the Text property.
    wait(3)
    hint:Destroy()
end)

Hope this helped.

2 comments

0

Thank you so much. The script work!

0

No problem.

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