So, I'm trying to use the Trello API. I'm intending to set a variable which will check for a list on a trello. Problem is, when I try to set the name of that list (would be medalselectorframe.Medal[i]), it returns an error saying: Medal is not a valid member of ScrollingFrame.

remotefunction.OnServerInvoke = function(player)
	print(player)
	local medalselectorframe = player.PlayerGui.Form.form.MedalSelector
	for i = 1,14,1 do -- Change for number of medals, accordingly.
	if medalselectorframe.Medal.Style == Enum.ButtonStyle.RobloxRoundDefaultButton then -- checks ownership if selected
		local medalListID = API:GetListID(medalselectorframe.Medal[i].Text,requestBoardID) -- This is important! Buttons need to be named EXACTLY like the trello boards for a medal.
			local ownerCards = API:GetCardsInList(medalListID) 
			if string.find(ownerCards.player) then
				print("Medal is owned.")
			else
				warn("Medal is NOT owned. Can't proceed.")
			end
		end
	end
end

4 comments

0

It's likely because you're trying to access a descendant of the PlayerGui through the server.

0

maybe WaitForChild? If the Instance doesn't exist at the time of the script running then this could solve your issue

0

unless you're running through a server-script, in which case I think DeceptiveCaster may be correct

0

Yeah, that might be it. I'm using a server script.