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

Trello API help? :C

Ok heres a problem. When admin (ex: me) joined in place. This script adding new card when that admin in list "Admins" with userId. But i dunno why this script not working. Anyone help with this? (Its with trello system) Here a script.

--DONT REMOVE DEEZ!!!!--
local Trello = require(game.Workspace.TrelloAPI)
local BoardID = Trello:GetBoardID("My_game")
local AdminListID = Trello:GetListID("Admins",BoardID)
local BanListID = Trello:GetListID("Banlist",BoardID)
local UserID = game.Players.LocalPlayer.UserId
local step1 = Trello:GetCardID(UserID,BoardID)
local Target = Trello:GetCardInfo(step1,BoardID)
--DONT REMOVE DEEZ!!!!--

function CheckAdmin()
	if Target.Name == UserID then
		Trello:AddCard(UserID," ",BanListID)
	else
		print("Error when checking...")
		end
end
script.Parent.MouseButton1Click:connect(CheckAdmin)

5 comments

0

Output and better formatting would be nice.

0

block with code not working sorry XC

0

still not working dat block code. I'M VERY SORRY ABOUT THAT!!! X'C

0

here go XC

0

It's not a LocalScript? Can't use LocalPlayer outside of a LocalScript dude.

1 answer

✓ Accepted answer

Something tells me that this Trello API isn't designed to work on the client. Either move your code to a Script, or work out a better way than LocalPlayer (If it's in a Script already)

EDIT: Scripts can't use LocalPlayer
You'd ought to look into a better way to grab the player causing an action.

2 comments

0

That script will detect UserId for search that card with UserId in list "Admins"...

0

Also its not localscript.

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