|
| 21 Dec 2013 08:09 PM |
b = script.Parent.Parent.Buttons.Value bb = script.Parent.Parent.ButtonsBought.Value while b > bb do if bb ~= 0 then script.Parent.Name = "Progress: ".. b/bb*100 .."% Completed!" elseif bb == 0 then script.Parent.Name = "Progress: 0% Completed!" wait(1) end end Here is the layout of the game(only things necessary): game Workspace Tycoon Factory ButtonsBought Buttons Progress: 0% Completed! script |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Dec 2013 08:27 PM |
| What parts are not working |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2013 08:38 PM |
| I'm trying to get it to display how close a player is to completion of a tycoon, it will display the "Progress: 0% Completed!" but after I touch a button (adding 1 to buttons bought) the percentage will not go up. |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2013 08:51 PM |
Here's an idea but it might not work so you might not use it. it uses a number value
while true do Percent = game. Work space .Percent script.Parent.Name = "Progress: # .. Percent.Value .. ## Completed!# end
it should work if not then edit it some and in each button add these lines of code:
Percent = game. Work space .Percent function hit()--this is probably already in the script but if not it's here anyway Percent.Value + 1 end
script.Parent.hit: connect (hit) |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2013 10:07 PM |
As @above said, you're probably not incrementing the value of b, and bb
|
|
|
| Report Abuse |
|
|
|
| 21 Dec 2013 10:10 PM |
| Could I have a look at the script for the button? I think I may know the problem. |
|
|
| Report Abuse |
|
|
| |
|