|
| 29 Aug 2013 04:43 PM |
I've already written it out and such but it says on line 47 "c is not a valid member of Part"
Please look at it and let me know what's wrong. I'll do the same :)
local b = script.Parent local c = BrickColor local m = Material local x = math.random(1,1000) if x > 994 then --0.5 b.Name = "Diamond" b.c = b.c.new("Teal") b.m = "Ice" elseif x > 995 and x > 984 then --1% b.Name = "Sapphire" b.c = b.c.new("Bright blue") b.m = "Ice" elseif x > 985 and x > 974 then --1% b.Name = "Ruby" b.c = b.c.new("Bright red") b.m = "Ice" elseif x > 975 and x > 964 then --1% b.Name = "Emerald" b.c = b.c.new("Bright green") b.m = "Ice" elseif x > 975 and x > 954 then --2% b.Name = "Gold" b.c = b.c.new("New Yeller") b.m = "Foil" elseif x > 955 and x > 924 then --3% b.Name = "Quartz" b.c = b.c.new("White") b.m = "Ice" elseif x > 925 and x > 874 then --5% b.Name = "Silver" b.c = b.c.new("Medium stone grey") b.m = "Foil" elseif x > 875 and x > 799 then --7.5% b.Name = "Copper" b.c = b.c.new("Bright orange") b.m = "Foil" elseif x > 800 and x > 699 then --10% b.Name = "Coal" b.c = b.c.new("Really black") b.m = "Slate" elseif x > 700 and x > 499 then --20% b.Name = "Stone" b.c = b.c.new("Dark stone grey") b.m = "Slate" elseif x < 500 then --50% b.Name = "Dirt" b.c = b.c.new("Dark orange") <---- Line 47 (This message isn't in the script) b.m = "Concrete" end
And BTW don't steal pls. |
|
|
| Report Abuse |
|
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
|
| 29 Aug 2013 04:46 PM |
Very messy script btw but local b = script.Parent local c = b.BrickColor local m = b.Material That way your declaring the brick that is parent to your script |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2013 04:48 PM |
| Ok thanks! I get the "Your script is messy" thing a lot. Any suggestions how to clean it up? .-. |
|
|
| Report Abuse |
|
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
|
| 29 Aug 2013 04:51 PM |
| I suggest learning more about roblox tables and the "for loops" |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2013 04:55 PM |
Well I also have a another problem now that you fixed the first one,
c = c.new("Really red")
Error: "new is not a valid member"
Do you know how to fix this ._.
I tried making new variables like cn = b.BrickColor.new, But it won't work. It still shows the error. |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 29 Aug 2013 04:57 PM |
| Don't use variables for .new maybe? |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2013 05:00 PM |
I already tried and it's still not working I even did
b.BrickColor = b.BrickColor.new("Really red")
Error: "new is not a valid member"
X_x |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2013 05:01 PM |
| b.BrickColor = BrickColor.new("Really red") |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Aug 2013 05:13 PM |
| Well I just had to polish it up a bit and like completely remove the variable since they DIDN'T WORK. At least I'm done now x) |
|
|
| Report Abuse |
|
|
Raphael7
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
| |
|