yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 04:27 PM |
script.Parent.cash.Text = (tostring(NewValue).."$")
Doesnt seem to work. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 28 Dec 2013 04:28 PM |
| You don't need tostring, but that shouldn't break it either.. |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 04:31 PM |
| NewValue is a numbervalue. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 04:32 PM |
script.Parent.cash.Text = NewValue .. "$"
That should work, you don't need to use tostring. |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 04:36 PM |
I don't know why it stopped working then. Can you give it a shot?
game.Players.PlayerAdded:connect(function(p) if p:WaitForDataReady() then folder = Instance.new("Configuration",p) folder.Name = "Stats" money = Instance.new("NumberValue",folder) money.Name = "Money" money.Value = p:LoadNumber("Money") money.Changed:connect(function(NewValue) p:SaveNumber("Money", NewValue) script.Parent.cash.Text = NewValue .. "$" end) end
while true do money.Value = money.Value + 100 wait(1440) end end)
|
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 04:39 PM |
| Where is this script? In the workspace? |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:40 PM |
Output?
And to make it more efficient. while wait(1440) do money.Value = money.Value + 100 end)
|
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 28 Dec 2013 04:43 PM |
Why does this have a closed parenthesis?
while true do money.Value = money.Value + 100 wait(1440) end end) <---- |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 04:43 PM |
Are you testing this in Solo? PlayerAdded doesn't work in Solo.
Go to http://wiki.roblox.com/index.php/PlayerAdded_(Event) to learn how to use that event in solo. |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:43 PM |
| Are you testing it in game? Or just in solo? PlayerAdded doesn't work in solo. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 04:44 PM |
@Azarth
game.Players.PlayerAdded:connect(function(p)
He needed to close the function if you didn't see that. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 28 Dec 2013 04:46 PM |
| Oh, yeah I didn't see that. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 04:47 PM |
| If its a hint/message it should be Text otherwise it should be Value |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 04:47 PM |
| 23:47:18.945 - Players.Player1.PlayerGui.Money.MoneyScript:18: attempt to call global 'PlayerAdded' (a nil value) |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:48 PM |
Put this at the end of your script. for _, player in pairs(game.Players:GetPlayers()) do PlayerAdded(player) end |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 28 Dec 2013 04:49 PM |
| Don't put that script in PlayerGui.. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:50 PM |
| owait i diddn't realize it was there. |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 04:53 PM |
@btft Already done that.
This is my explorer. game -Workspace -Lighting -PlayerGui --Money ---MoneyScript ---cash -Starterpack |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:54 PM |
| Is Moneyscript a localscript? |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 28 Dec 2013 04:55 PM |
| Hm? repeat wait() until script.Parent.Parent ?? |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
| |
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 28 Dec 2013 05:12 PM |
| What did you mean with repeat wait() until script.Parent.Parent ? |
|
|
| Report Abuse |
|
|