Ryloxx
|
  |
| Joined: 20 Sep 2011 |
| Total Posts: 112 |
|
|
| 16 Aug 2015 06:50 PM |
I'm not getting any errors, but the brick's color won't change even though my money value is below Price's value. Any ideas?
owner = script.Parent.Parent.OwnerName.Value
local thisplr = game.Players:findFirstChild(owner) if (thisplr~=nil) then local stats = thisplr:findFirstChild("leaderstats") if (stats~=nil) then local score = stats:findFirstChild("Money") if (score~=nil) then if score.value > (script.Parent.Price) then script.Parent.BrickColor = BrickColor.new(1020) else if score.value ==(script.Parent.Price) then script.Parent.BrickColor = BrickColor.new(1020) else if score.value < (script.Parent.Price) then script.Parent.BrickColor = BrickColor.new(1004) end end end end end end
(Sorry for the messed up formatting) |
|
|
| Report Abuse |
|
|
Ryloxx
|
  |
| Joined: 20 Sep 2011 |
| Total Posts: 112 |
|
|
| 16 Aug 2015 06:52 PM |
| I should note, I added .Value to the end of all of the times I called script.Parent.Price, but still it's not working. No errors in the feedback, but nothing is happening. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 16 Aug 2015 06:52 PM |
put prints wherever you think problems are
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
Ryloxx
|
  |
| Joined: 20 Sep 2011 |
| Total Posts: 112 |
|
|
| 16 Aug 2015 06:59 PM |
| The script doesn't make it past Line Three, however I have no idea what's wrong there. Anyone have any ideas? |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 07:06 PM |
| You got anything to start the script? A function etc.? |
|
|
| Report Abuse |
|
|