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

Trello API script that is supposed to add a card doesn't work?

local startg = game:GetService("StarterGui")
local frame = startg.m.Main
local username = frame.username.Text

function cardAdded(card)
	print(username)
end

frame.Ban.MouseButton1Click:Connect(function()

	local api=require(script.Parent.TrelloAPI)
	local boardid=api:GetBoardID("Moderation")
	local listid=api:GetListID("Banned Players",boardid)
	api.CardAdded(listid):connect(cardAdded)
end)

It's supposed to grab the username text that the mod/admin has inputed inside of the textbox and then make a card on the trello? Why isn't this working?

1 answer

It looks as if the script you're using is in a local script, you cannot send http requests on the client which is needed for that module to work. Use a remote event to send requests to the server and use the trello module there.

I also see another error, the player's gui is not in starterGui, the gui's in starterGui is the gui's that should be cloned to the playerGui when the character spawns. You have 1 of 2 options of fixing this, you could parent your script to the gui and do:

script.Parent.Ban.MouseButton1Click

or you could do

game.Players.LocalPlayer.PlayerGui

Best of luck!

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