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

Trello API help? :C

Asked by 8 years ago

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)
0
Output and better formatting would be nice. User#6546 35 — 8y
0
block with code not working sorry XC ProCoolEXE 27 — 8y
0
still not working dat block code. I'M VERY SORRY ABOUT THAT!!! X'C ProCoolEXE 27 — 8y
0
here go XC ProCoolEXE 27 — 8y
0
It's not a LocalScript? Can't use LocalPlayer outside of a LocalScript dude. User#6546 35 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

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.

0
That script will detect UserId for search that card with UserId in list "Admins"... ProCoolEXE 27 — 8y
0
Also its not localscript. ProCoolEXE 27 — 8y
Ad

Answer this question