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

What's wrong with this Character Customization script?

I am still new to scripting, and I'm trying to configure a script for an ImageButton that contains a BrickColorValue, and in that ImageButton has a localscript with this following script- Is it the custom model that is the problem, or the script itself?

Player =game.Players.LocalPlayer
Character = Player.Character
x = script.Parent.Value.Value
script.Parent.MouseButton1Down:connect(function()
	Character("Torso1")BrickColor = BrickColor.new(""..x.."")
end)

Along with this, it says 'Torso1 is not a valid member of Model'.

UPDATE- 6:37 PM EST 3/30/18

I fixed the 'Torso1 is not a valid member of Model' issue, but it still will not recolor it. I figured out what I am doing wrong, it refuses to color itself because of some glitch happening with the building plugin i used.

3 comments

0

That didn't work, I still have the same problem.

0

In R6 and R15 there is no such thing as "Torso1". In R6 it is just Torso and in R15 I would use Upper Torso. Line 5 should look like this for R6: Character:WaitForChild("Torso").Brickcolor = BrickColor.new(x) R15: Character:WaitForChild("Upper Torso").Brickcolor = BrickColor.new(x). To Find what a body part's name is, load in singleplayer and figure it out in workspace :)

0

@zyrun Will this work for a custom model, though? I am not using an r15 or r6 model, but my own, rigged and animated model. The upper torso is called Torso1, which is why it's in there... ;w;

1 answer

✓ Accepted answer

First of all you have a error on line 1 were it says

Player =game

it should be

Player = game

Moreover i guessing Torso1 is what you want to color, make sure in your workspace everything is named correct, remember small errors, makes a big crash in your game. Also please provide more information tell us what it is doing or not doing.

3 comments

0

I changed that, it keeps saying ' Torso1 is not a valid member of Model.'

0

That isn't an error... oh my god.

0

@TOXN stop commenting on my post and stop down voting my answers.

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