Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a characters change depending on what team they're on?

Asked by 9 years ago

I've asked a similar question before, and got answers, but I still need a little more guidance. A few days ago, I researched and wrote a (bad) script where the player's avatar changes, but to an actual avatar on the ROBLOX website. This is unreliable, because people change their characters, and I don't want that happening in my game. I want the script to give the character a specific "uniform" (including hats, and faces) if they join a team. Similar to Wingman8's "Armored Patrol" game.

0
Are you asking for a whole script that will change the character based on their team? Or suggestions that will help lead you to creating one? alphawolvess 1784 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Here's a good start for what you want. I just wrote this and tested it for you.

local localplayer = script.Parent.Parent --This defines the player


while true do --A loop to constantly check for the player's team
    wait()
    if localplayer.TeamColor == BrickColor.new("Mid gray") then --if in team "Mid gray" then
        localplayer.Character.Torso.BrickColor = BrickColor.new("Mid gray") --Change torso color to "Mid gray"
    else --In case you want, you can always add an "elseif player is in some other team, then change it to a different color" or something, but for now I just added a generic "else"
    print("Player isn't in the Mid gray team so nothing will happen!")
    end
end

This will change the color of the player's torso to "Mid gray" if the player is in the "mid gray" team. I'm not going to write an entire system that customizes the character's hats and faces, but with this setup, you can easily do that yourself. I hope this helped!

0
I believe he also want's hat and clothing changes as well. This is why I didn't answer yet, No clue. alphawolvess 1784 — 9y
0
Yes, I do want hats an clothing as well. This works, but is not what I'm looking for. BartyCrouchJunior 57 — 9y
Ad

Answer this question