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

How do I change the R6 type body colors??

Asked by 5 years ago

I was trying to do that and i saw the name of the parts have spaces on it, like "right arm" and "left arm". So, how do i do that??

local Tool = script.Parent;

local player = script.Parent.Parent

Tool.Equipped:connect(function()

player.Right Arm.BrickColor = BrickColor.new("Linen")

end)


it didnt work for me. Help pls

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

When trying to get instances/objects with names that have a space (" ") in them, use []s. (e.g. game.Workspace["Some Stuff Here"]).

In your case, you can use ["Right Arm"]. ```lua local Tool = script.Parent;

local player = script.Parent.Parent

Tool.Equipped:connect(function()

player["Right Arm"].BrickColor = BrickColor.new("Linen")

end) ``` I hope this will help. Feel free to leave any questions in the comments.

Ad

Answer this question