|
| 03 Nov 2013 04:43 PM |
No output at all, just waits several seconds, then displays the "Not Enough Cash" Sign
Yes, cash is a valid value, yes, I have leaderstats, yes, I am running this on a server.
help?
local Info = script.Parent.Parent.Information local player = script.Parent.Parent.Parent.Parent.Parent local tool = game.Lighting:FindFirstChild("JetPack") local clone = tool:Clone()
function OnClick() if player.leaderstats.Cash.Value <30 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value -30 clone.Parent = player.Backpack Info.Text = "Congratulations! You Rented a JetPack!" Info.Visible = false wait(2) Info.Visible = true else Info.Text = "Not Enough Cash!" Info.Visible = false wait(2) Info.Visible = true end end
script.Parent.MouseButton1Click:connect(OnClick) |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 03 Nov 2013 04:50 PM |
local Info = script.Parent.Parent.Information local player = script.Parent.Parent.Parent.Parent.Parent local tool = game.Lighting:FindFirstChild("JetPack") local clone = tool:Clone()
function OnClick() if player.leaderstats.Cash.Value =< 30 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 30 clone.Parent = player.Backpack Info.Text = "Congratulations! You Rented a JetPack!" Info.Visible = false wait(2) Info.Visible = true else Info.Text = "Not Enough Cash!" Info.Visible = false wait(2) Info.Visible = true end end
script.Parent.MouseButton1Down:connect(OnClick) |
|
|
| Report Abuse |
|
|
|
| 03 Nov 2013 04:52 PM |
| That comes out iwth then expected near = |
|
|
| Report Abuse |
|
|
ModZombie
|
  |
| Joined: 11 Feb 2011 |
| Total Posts: 42 |
|
|
| 03 Nov 2013 04:54 PM |
| Also, besides the script, I have a suggestion for your future posting. Try making your Subject in the form of a question next time, more relevant to your issue, and very breif. This helps people who are trying to help you, get a breif summary of your post. Then, your post should include important details of what you're trying to do, not just a script, and not details that are unnecessary. Thanks! |
|
|
| Report Abuse |
|
|
| |
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
| |
|
|
| 03 Nov 2013 04:55 PM |
| Sorry mod, I'm just been having a lot of issues with anything I have been trying to make, and get tired of it. :l |
|
|
| Report Abuse |
|
|
ModZombie
|
  |
| Joined: 11 Feb 2011 |
| Total Posts: 42 |
|
|
| 03 Nov 2013 04:57 PM |
| No need to be sorry. It just helps catch the eye and direct people who CAN help to your post, rather than people who can't. Be aware, this site has a lot of "TL;DR Noobs". That should be a more general reason to use my posting suggestions. |
|
|
| Report Abuse |
|
|