With the TrelloAPI, I created a feedback GUI where players can type a message, and send it to my private Trello board. It worked fine, but on Trello, it wasn't getting the username, and it ended up with Sent By: Players. I wanted to get the full username, or rather, the author of the message. (The token works already, as well as the boardID, listID, and cardID.)
Here is my code found in a TextButton that sends anything that is written in a TextBox to a new card in a list on my Trello board:
ap = require(script.Parent.Parent.Parent.TrelloAPI)
local Board = ap:GetBoardID("myboard")
local List = ap:GetListID("test1",Board)
local count = false
script.Parent.MouseButton1Down:connect(function()
if count == false and script.Parent.Parent.TextFrame.TextBox.Text ~= "Type here..." then
wait(2)
ap:AddCard(script.Parent.Parent.TextFrame.TextBox.Text,"Sent by: "..game.Players.LocalPlayer.Name,List,"","top")
script.Parent.Parent.TextFrame.TextBox.Text = "Type here..."
count = true
for i = 240, 0, -1 do --240 seconds per feedback
script.Parent.Parent.TextTimer.Text = "You can post a comment in: "..i
wait(1)
end
count = false
script.Parent.Parent.TextTimer.Text = "You can post a comment every 4 mins"
else
script.Parent.Parent.ReactionSound:Play() wait(.15) script.Parent.Parent.ReactionSound:Play()
end
end)
When I typed in some random words and hit the Send button, nothing happened. I checked the ROBLOX Developer Console (F9) and I saw this:
Players.TegraDash.PlayerGui.ScreenGui.FeedBackFrame.Enter.Script:10: attempt to index field 'Local Player' (a nil value)
Here is Line 10, same script as above:
ap:AddCard(script.Parent.Parent.TextFrame.TextBox.Text,"Sent by: "..game.Players.LocalPlayer.Name,List,"","top")
This line adds the Sent by: (player name) to the card description.
I converted it from a regular script to a Local Script to see if that solved my problem. I tested it in Studio. It worked fine. I published the game, did the same test, and it did nothing. There was no error message in the console either.
Can anyone explain the discrepancies in this?

3 comments
Hmm... This sounds weird. Maybe you could fix it by having a player write their name into a TextBox? Or, you could just go gui.Parent until you get to their Player, cause guis are stored in a child of a Player.
You can ONLY use LocalPlayer in a LocalScript, not a Server-Sided script. I will have to check but I believe HttpService requires a server-sided script to work. So you will probably need a RemoteEvent for your script to work.
Sorry this isn't exactly constructive, but can you link me to that API? I want people to be able to be able to view progress on my games, while they're playing them.