There isn’t enough information here for us to figure out whats going wrong. Are there any errors/warnings being printed in the console? What exactly is TrelloAPI:AddCard() doing? The problem is likely to be in that function. It’d also be useful to know what arguments are being passed to the remote.
Some other things, you should definitely be checking if the player who fired the remote has permission to kick, passing the player instance of the kick target instead of their username (or just the UserId to simply things further), and checking that playerToKick isn’t nil before calling AddCard().
Edit: You should also use :Connect (capital C) instead of :connect (lowercase c, deprecated)
it might be that playerToKick is already a player, or is a character.
if its already a player no need to do: local player1 = game.Players:FindFirstChild(playerToKick)
If its a character you should be using :getPlayerFromCharacter(playerToKick)
And if playerToKick is a name, I assume you got it from a character, so instead of setting playertokick as a stringvalue you should set it as a player. playertokick = :getPlayerFromCharacter(character)
Oops, I completely missed the .Kick, in that case, it uses API services outside of Roblox, which could be a problem with your scripts elsewhere, also did you try printing all the information, and was it successful? Is API services also on? Check all that and then let me know further issues.
Great! But I’m still confused as to why adding a string to the player’s UserId would fix it. Please let me know why that solved your issue as I would like to learn too!