|
| 30 Jun 2013 05:33 PM |
I'm editing a script and it doesn't work, no output, and I have no clue to what is wrong. Its a script that is supposed to recolor the morph suit your character is wearing. Here's the code.
function whatever() frame = script.Parent.Parent if frame.W.Value == 1 then print("1") frame:remove() Workspace.Character.Arm1.Middle.BrickColor = BrickColor.new(26) Workspace.Character.Arm2.Middle.BrickColor = BrickColor.new(26) Workspace.Character.Chest.Middle.BrickColor = BrickColor.new(26) Workspace.Character.Chest.bodyfrontA.BrickColor = BrickColor.new(26) Workspace.Character.Chest.bodyfrontB.BrickColor = BrickColor.new(26) Workspace.Character.Chest.ear1.BrickColor = BrickColor.new(26) Workspace.Character.Chest.ear2.BrickColor = BrickColor.new(26) Workspace.Character.Chest.head.BrickColor = BrickColor.new(26) Workspace.Character.Chest.muzzle.BrickColor = BrickColor.new(26) Workspace.Character.Chest.nose.BrickColor = BrickColor.new(26) Workspace.Character.Chest.tail.BrickColor = BrickColor.new(26) Workspace.Character.Chest.torseo.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.BPart.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.Handle.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.Middle.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.Part.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.RBfoot1.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.RBfoot.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.RLback1.BrickColor = BrickColor.new(26) Workspace.Character.Leg1.RLfront1.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.BPart.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.Handle.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.Middle.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.Part.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.RBFoot2.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.RBfoot3.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.Llback2.BrickColor = BrickColor.new(26) Workspace.Character.Leg2.Llfront2.BrickColor = BrickColor.new(26) frame.Visible = false
end end --script.Parent.BrickColor = BrickColor.new(26) --brown red black white grey --217 = Brown --21 = Bright red --26 = Black --1 = white --199 = Dark stone grey
script.Parent.MouseButton1Down:connect(whatever) |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:39 PM |
| I edited it a little and placed the variable above the function, now the output says "character is not a valid member of workspace" how would I make it so it finds the player who clicked the gui button? |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:40 PM |
| You're removing the frame, and inside the frame is the script. Just remove the frame:remove() part. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:42 PM |
| And there is no such thing as character in the workspace. Try to put it as a variable like this: player = frame.Parent.Parent.Parent (change to where the player is) |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:49 PM |
| Ok I removed the frame line but the only concern I have with adding the Player variable is that it's only going to look for one player, because I want the script to find the player who clicked the button so that when it's used in a game it doesn't just find that player, but finds the person who clicks it. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:52 PM |
| It's going to find the player who clicked it no matter what because it's in their PlayerGui (or is it?) |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 05:53 PM |
| yes it's in the player gui |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Jun 2013 06:13 PM |
| It isn't tough. Believe me I wish it worked :( I just don't know what to do anymore |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 06:18 PM |
| never mind i give up, im done with scripting |
|
|
| Report Abuse |
|
|