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.
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.
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?