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: Doing it wrong? Body colors...

Previous Thread :: Next Thread 
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 11:41 AM
It says "string expected, got nil"

game.Workspace[Plyr]["Body Colors"].HeadColor=BrickColor.new("Pastel yellow")
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
05 Jun 2014 11:42 AM
It should be ["Plyr"] not [Plyr]
Report Abuse
WickedSiege is not online. WickedSiege
Joined: 03 Oct 2011
Total Posts: 3039
05 Jun 2014 11:42 AM
Do

game.Workspace["Plyr"]
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 11:43 AM
Ummm, no it isn't. The problem with plyr is it's a variable. I just forgot to put plyr.Name which yet again it still doesn't work.
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
05 Jun 2014 11:45 AM
If there is a model in the workspace named Plyr, then Plyr shouldn't be a variable, it should be a string.
Report Abuse
WickedSiege is not online. WickedSiege
Joined: 03 Oct 2011
Total Posts: 3039
05 Jun 2014 11:45 AM
game.Workspace:FindFirstChild(Plyr)["Body Colors"].HeadColor = BrickColor.new("Pastal yellow")
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 11:48 AM
Ok, I didn't really explain. This is in a Frame, within a GUI. plyr is a variable that roots back to game.Players.LocalPlayer, I could use that but I'm too far to care. This variable when given Plyr.Name should work. Yet the whole line/script doesn't work.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 11:50 AM
Workspace:WaitForChild(Plyr.Name):WaitForChild("Body Colors").HeadColor = BrickColor.new("Pastel yellow")
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
05 Jun 2014 11:52 AM
@noob
You should have said that...
How is the change triggered?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
05 Jun 2014 11:54 AM
plyr.Character.BodyColor.HeadColor = BrickColor.new("Pastel yellow")
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 11:54 AM
Here, just look at the whole script.

script.Parent.B01.MouseButton1Click:connect(function()
plyr=script.Parent.Parent.Parent.Parent
game.Workspace[Plyr.Name]["Body Colors"].HeadColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].TorsoColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].LeftLegColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].LeftArmColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].RightLegColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].RightArmColor=BrickColor.new("Pastel yellow")
Spawn(spawnchar)
end)
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 11:56 AM
plyr=script.Parent.Parent.Parent.Parent
Plyr.Name

orly?

Plyr~=plyr bro
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 11:57 AM
Well, don't have to sound stuck up about it. I honestly didn't realize it till just before your smart remark.
Report Abuse
BlupoV2 is not online. BlupoV2
Joined: 12 Nov 2012
Total Posts: 543
05 Jun 2014 11:57 AM


script.Parent.B01.MouseButton1Click:connect(function()
plyr=script.Parent.Parent.Parent.Parent
game.Workspace[Plyr.Name]["Body Colors"].HeadColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].TorsoColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].LeftLegColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].LeftArmColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].RightLegColor=BrickColor.new("Pastel yellow")
game.Workspace[Plyr.Name]["Body Colors"].RightArmColor=BrickColor.new("Pastel yellow")
Spawn(spawnchar)
end)

Plyr and plyr are not the same variable.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 11:58 AM
stuck up?

Plyr~=plyr bro

~= not equal to

you simply forgot to capitalize the P in plyr variable..

sorry if me helping you is stuck up, I guess I shouldn't help you anymore right?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 11:58 AM
@Blu

I love ninjaing people XD

go away floodcheck
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
05 Jun 2014 11:59 AM
such fail
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 12:02 PM
The way you said it had a sarcastic tone to it. Forgive me, I hope you agree that 90% of these forums are full of trolls such as the recent "Fail" post above me. Messing around with this project for 5 hours straight is going to cause me to make small mistakes and look like and idiot in these forums.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
05 Jun 2014 12:03 PM
i am not troll, ur the one with obvious error xddddddd
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 12:03 PM
mistakes in variables happen all the time, nobody is calling you an idiot
(someone probably will after this post just to be a troll)

and er..its a message, theres no tone to it..
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
05 Jun 2014 12:03 PM
So given the fact that text has no tone it can be mistaken for anything. I tend to have a short fuse and go on rants, only when you are only trying to help.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
05 Jun 2014 12:04 PM
don't worry noob, it just means u has anger problems lol
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 12:05 PM
@Duel

your the kind of troll hes speaking of.. lol

@OP

seriously, don't worry about it, people say im being rude/sarcastic w/e on the forums all the time..

anyways, im happy to help, that's why im here lol

Thread closed now?
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