generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: What did I do wrong?

Previous Thread :: Next Thread 
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
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
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
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
TheTerminator01 is not online. TheTerminator01
Joined: 05 May 2009
Total Posts: 97
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
TheTerminator01 is not online. TheTerminator01
Joined: 05 May 2009
Total Posts: 97
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
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
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
TheTerminator01 is not online. TheTerminator01
Joined: 05 May 2009
Total Posts: 97
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
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
30 Jun 2013 05:53 PM
yes it's in the player gui
Report Abuse
TheTerminator01 is not online. TheTerminator01
Joined: 05 May 2009
Total Posts: 97
30 Jun 2013 06:02 PM
Then it's gonna work...
Report Abuse
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
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
whisperingzebragirl is not online. whisperingzebragirl
Joined: 19 Apr 2012
Total Posts: 74
30 Jun 2013 06:18 PM
never mind i give up, im done with scripting
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image