Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 13 Aug 2012 04:35 PM |
function onTouch(hit) local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil and debounce == false then debounce = true playsound:play() local Wallet = game.Players:findfirstChild(h.Parent.Name):findFirstChild("leaderstats") if(Wallet ~= nil and Wallet.Cash.Value >= costperplay) then -- change 'Credits' to your money name Wallet.Credits.Value = Wallet.Cash.Value - costperplay-- change 'Credits' to your money name -- change the color of the start brick script.Parent.BrickColor = BrickColor.Black() -- lets randomise the colors for a bit end |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2012 04:40 PM |
You have no connection displayed. You never set debounce to false. It will error upon contact with bullets.
|
|
|
| Report Abuse |
|
|
usama8800
|
  |
| Joined: 29 Dec 2009 |
| Total Posts: 225 |
|
|
| 13 Aug 2012 04:40 PM |
What do you mean will work? havnt you tested it? btw local Wallet = game.Players:getPlayerFromCharacter(h.Parent.Name):findFirstChild("leaderstats") script.Parent.BrickColor = BrickColor..new("Black") after changing these 2 lines. it should but i think Wallet.Credits.Value = Wallet.Cash.Value - costperplay line might have an error |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 13 Aug 2012 04:41 PM |
| here ill post the full script k? |
|
|
| Report Abuse |
|
|