Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

1 comment

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?

1 answer

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!

2 comments

0

I believe he also want's hat and clothing changes as well. This is why I didn't answer yet, No clue.

0

Yes, I do want hats an clothing as well. This works, but is not what I'm looking for.

This discussion is preserved as it was. New answers, comments, and votes are closed.