Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 8 years ago
Edited 8 years ago

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.

Marked as Duplicate by User#5423, Thetacah, GoldenPhysics, and RubenKan

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

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.

0
Thank you so much. The script work! Apolloqi -3 — 8y
0
No problem. Pyrondon 2089 — 8y
Ad