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

Keydown arm color changing script not working? (PLEASE READ BELOW!)

Asked by
xVanc -1
8 years ago
Edited 8 years ago

in full detail, I am trying to switch the color to the color black, then with the same key switch back to the player's original skin color, but using the same key (q). do i use elseif or what?

PROBLEM:

there are two problems,

1, being: I'm trying to make a script where if you click a certain key it turns your arm black. if you click the same key you can revert to your original skin color. it doesn't seem to work when i use elseif? im new to this so if you could help i'd be glad. without this I can't continue problem 2.

2, being: in line 54, it says that there is no such thing as BrickColor, in the player in workspace. once you fix 1, this one is the next problem.

THIS IS A LOCALSCRIPT.

01Player = game.Players.LocalPlayer
02mouse = Player:GetMouse()
03 
04repeat wait() until Player.Character
05 
06local char = Player.Character
07local torso = char:findFirstChild("Torso")
08local leftarm = char:findFirstChild("Left Arm")
09 
10enabled = true
11 
12function onKeyDown(key)
13    key = key:lower()
14    if key == 'q' then
15        local part = char["Left Arm"]:Clone()
View all 61 lines...

if you could help, i'd be thankful. thanks!

Answer this question