ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 04:51 PM |
Here is the script:
local player = game.Players.LocalPlayer local mg = script.Parent:WaitForChild("HireMoney") Bought = script.Parent.Bought.Value Boguht = false HireCost = 10 script.Parent.MouseButton1Click:connect(function(Building) if player:FindFirstChild('leaderstats').Cash.Value >= HireCost then Bought = true HireCost = HireCost * 2 if Bought == true then mg.Value = mg.Value + 1 end player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - HireCost while wait(.5) do player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + mg.Value end end end)
When you click the button it buys a worker for you then it gives you how much the HireMoney is over .5 seconds and the hire cost is doubled. But it will not buy it when I click. Wont even work in studio. Please Help me
+1 Forum post |
|
|
| Report Abuse |
|
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 04:52 PM |
Every .5 seconds*
+1 Forum post |
|
|
| Report Abuse |
|
|
Vortilis
|
  |
| Joined: 06 Jul 2014 |
| Total Posts: 14163 |
|
|
| 05 Nov 2016 04:57 PM |
http://wiki.roblox.com/index.php?title=Intro_to_Scripting
|
|
|
| Report Abuse |
|
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 04:59 PM |
I've already looked through the wiki. But thanks.
+1 Forum post |
|
|
| Report Abuse |
|
|
| |
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 05:05 PM |
Then how would I make it give Cash every .5 seconds?
+1 Forum post |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2016 05:11 PM |
| Put that in a different script. |
|
|
| Report Abuse |
|
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 05:17 PM |
Still will not work.
+1 Forum post |
|
|
| Report Abuse |
|
|
Briicks
|
  |
| Joined: 03 Apr 2015 |
| Total Posts: 1796 |
|
| |
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 06:32 PM |
I fixed that in the script. It wont work. Besides this is old I already got help on a different website(ScriptHelpers). But it only works in studio.
+1 Forum post |
|
|
| Report Abuse |
|
|
ASAP_Bang
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 116 |
|
|
| 05 Nov 2016 06:34 PM |
scriptinghelpers(DOT org)(SLASH)questions(SLASH)36914(SLASH)ive-been-trying-to-fix-this-for-30-minutes-any-way-to-fix-this-scriptedited
+1 Forum post |
|
|
| Report Abuse |
|
|