I'm making this Vietnam War based game and I'm trying to get team only avatars. I made 2 models 1 for VC, 1 for USMC, but I made them as StarterCharacters. Help me with this please :(
This is the code I tried using, as its free modeled I don't understand it.
local TeamAppearances = {USAF = "3859337296",
VietCong = "3859340251"}
-- for character appearance-changing, this part never changes and always comes first, right before the UserID that you want to dress like
local TeamBaseURL = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="
-- since this script is in StarterPack, it'll get put into Player.Backpack, so script.Parent.Parent is the player
local Player = script.Parent.Parent
-- loop through all the teams and find the one with the same color as our player
for _, team in pairs(game.Teams:GetTeams()) do
if (Player.TeamColor.Name == team.TeamColor.Name) then
-- now find the team appearance in our table, if it exists
local teamAppearance = TeamAppearances[team.Name]
if teamAppearance then
-- we've got the appearance; now dress the player!
Player.CharacterAppearance = TeamBaseURL .. teamAppearance
end
end
end

5 comments
you cant tell us that u just took a script from the toolbox and want us to fix it for u because u dont understand it
im asking whats wrong with it
well im not going to help until u try make ur own team script
Do you have any error codes? If not use print() to find out where the code stops at.
ContentProvider:Preload() failed for rbxassetid://1099104545