Trello API Does not work with .PlayerAdded

Myself and another have been working with the Trello API. We have figured it all out, but the problem lies with using PlayerAdded. The script works perfectly fine but as soon as we put it into

game.Players.PlayerAdded:Connect(function()

it stops working. If anyone could tell me why or if you’ve experienced this problem, how did you fix it?

I haven’t used trello API for some time, but guessing you’re playtesting this in studio I think its because the trello API takes time to load and properly connect the event before you join. You could test this by maybe using it in a real server (may have the same problem tho) but then you can test by having a friend join and seeing whats happened.

I may be wrong though.

2 Likes

Thanks, this worked perfectly.

Also, the guy I’m working with says he might know you. Were you in a group called CA / Continental Army?

Possibly the API loading time is affecting the timing of the player added event try this:

local Players = game:GetService("Players") -- ROBLOX PLAYERS SERVICE
-- Your function
local function PlayerAdded(Player)
	-- Any stuff
	
end
-- Do the function for the players in the server
for _,v in pairs(Players:GetPlayers()) do
	PlayerAdded(v)
end
-- Connect the function for new servers
Players.PlayerAdded:Connect(PlayerAdded)
1 Like

Yeah, it has been figured out. It was indeed the loading time for the API, but thank you.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.