generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Yet another issue with a script

Previous Thread :: Next Thread 
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
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 is not online. 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
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
03 Nov 2013 04:52 PM
That comes out iwth then expected near =
Report Abuse
ModZombie is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Nov 2013 04:54 PM
<= not =<
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
03 Nov 2013 04:54 PM
Which line?
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image