Hello there,
I am trying to make a system, which it will clone Trello Data Cards to a roblox GUI.
The script:
local trello = require(script.TrelloAPI)
local config = require(script.Config)
local boardId = trello:GetBoardID(config.Board)
local sessionlist = trello:GetListID(config.List, boardId)
local template = script:WaitForChild("SessionPage")
local scroller = game.StarterGui.Sessions.Main.SessionsPage:WaitForChild('SessionPage')
while true do
local sessions = trello:GetCardsInList(sessionlist)
for _,session in pairs(sessions) do
print("test.")
if session.desc == "" then
else
local templateClone = template:Clone()
print("test!")
templateClone.HostLabel.Text = session.desc
templateClone.SessionDayLabel.Text = session.name
templateClone.TimeLabel.Text = "Time coming soon!"
templateClone.Parent = scroller
scroller.CanvasSize = UDim2.new(0, 0, 0, scroller.UIListLayout.AbsoluteContentSize.Y)
print("test..")
end
end
end
I tried to use print to see where my error was, but they print alright.
I have used this Trello API script for bans and it worked.
You’re parenting the templateClones to the ScrollingFrame which is a descendant of StarterGui, when I think you meant to parent it to a descendant of a player’s PlayerGui.
If you mess with the descendants of the StarterGui folder, those changes will only display for a client when they reset their character (or only if they rejoin the server if the changes were in a descendant of a ScreenGui with the ResetOnSpawn property set to false).
Give the docs I linked a read, and you should be able to work on a fix with the info!
Try moving the SurfaceGui out of StarterGui, I did some testing and it seems to have an effect on the board not updating.
As for everything being spammed, you can remove all the children of the ScrollingFrame before adding all the sessions (make sure to add a check for what class the child is before removing, so you dont remove something important such as the UIListLayout).
Ok:
Keep the while true loop, but add a task.wait(60) into it so it doesn’t spam. Also have it remove the current children of the scrollingframe each cycle so they don’t double up