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
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.