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

What's wrong with this Character Customization script?

Asked by 6 years ago
Edited 6 years ago

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.

0
That didn't work, I still have the same problem. Kozybee 4 — 6y
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 :) zyrun 168 — 6y
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; Kozybee 4 — 6y

1 answer

Log in to vote
-1
Answered by 6 years ago

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.

0
I changed that, it keeps saying ' Torso1 is not a valid member of Model.' Kozybee 4 — 6y
0
That isn't an error... oh my god. T0XN 276 — 6y
0
@TOXN stop commenting on my post and stop down voting my answers. Carforlife1 59 — 6y
Ad

Answer this question