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

My character appearance script isn't working?

So I made a script that changed the character appearance, so depending on team, it would change your torso, and your other parts would have the same color. The script doesn't seem to work though.

supporter = game:GetService("Teams").Supporter
army = game:GetService("Teams").Army
royalg = game:GetService("Teams")["Royal Guard"]
royalty = game:GetService("Teams")["Royalty"]
burner = game:GetService("Teams")["Burner"]
picking = game:GetService("Teams")["Picking"]
outsider = game:GetService("Teams")["Outsider"]

game.Players.PlayerAdded:Connect(function(plr)
	char = plr.Character or plr.CharacterAdded:Wait()
	plr.CanLoadCharacterAppearance = false
	plr:ClearCharacterAppearance()
	local rightarm = char:FindFirstChild("Right Arm")
	local leftarm = char:FindFirstChild("Left Arm")
	local rightleg = char:FindFirstChild("Right Leg")
	local leftleg = char:FindFirstChild("Left Leg")
	local torso = char:FindFirstChild("Torso")
	
	
	
	rightarm.BrickColor = BrickColor.new("Ghost grey")
	leftarm.BrickColor = BrickColor.new("Ghost grey")
	rightleg.BrickColor = BrickColor.new("Ghost grey")
	leftleg.BrickColor = BrickColor.new("Ghost grey")
	
	plr.Team.Changed:Connect(function()
		if plr.Team == army then
			torso.BrickColor = BrickColor.new("Cyan")
		elseif plr.Team == royalg then
			torso.BrickColor = BrickColor.new("Black")
		elseif plr.Team == royalty then
			torso.BrickColor = BrickColor.new("Gold")
		elseif plr.Team == outsider then
			torso.BrickColor = BrickColor.new("Smoky grey")
		elseif plr.Team == burner then
			torso.BrickColor = BrickColor.new("Really red")
		elseif plr.Team == supporter then
			torso.BrickColor = BrickColor.new("Terra Cotta")
		--elseif plr.Team == picking then
		end
	end)
	end)
	

4 comments

0

Anything in the output?

0

Nope. Nothing in Client or Server.

0

I'm assuming you're using a script and not a localscript? And also that you're using an R6 rig?

0

Yes and Yes

1 answer

Hi OhManLolLol.

From my observation, this is possibly a simple mistake.

While I'm not definite, I think you forgot a few "local"'s.

Try replacing the top bit of your script with this and get back to me:

local supporter = game:GetService("Teams").Supporter
local army = game:GetService("Teams").Army
local royalg = game:GetService("Teams")["Royal Guard"]
local royalty = game:GetService("Teams")["Royalty"]
local burner = game:GetService("Teams")["Burner"]
local picking = game:GetService("Teams")["Picking"]
local outsider = game:GetService("Teams")["Outsider"]

1 comment

0

Nothing changed.

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