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: Local Gui Script

Previous Thread :: Next Thread 
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
10 Sep 2013 09:09 PM
plyr = game.Players.LocalPlayer
Cash = script.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats.Points


function onClick()
if Cash.Value >= 10 then
Cash.Value = Cash.Value - 0
script.Parent.Parent.Parent.Parent.Parent.SwordGui.Frame.Frame.CurrentSword.Text = "Riptide"
end
end

script.Parent.MouseButton1Click:connect(onClick)

The parenting is correct for sure, I checked it 3 or 4 times. I dont see a problem. Does anyone else? There is nothing in the output, Or Remote Monitoring System.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
10 Sep 2013 09:10 PM
"Cash.Value = Cash.Value - 0"

Why is this here?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
10 Sep 2013 09:12 PM
Idk, I copied it from another script the gui, So I just kept it there.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
10 Sep 2013 09:19 PM
This is in a LocalScript, right?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
10 Sep 2013 09:21 PM
Yep
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
10 Sep 2013 09:26 PM
Then why don't you just do:

local plyr = game.Players.LocalPlayer
local Cash = plyr.leaderstats.Points
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
10 Sep 2013 09:29 PM
Will this fix it?
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
10 Sep 2013 09:30 PM
The if statement is most likely not following the condition. Try adding else print("ErrorFixed") to check.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
10 Sep 2013 09:31 PM
It doesnt print
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
10 Sep 2013 09:38 PM
Is the script enabled, or is it in a service that doesn't run scripts such as lighting?
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
10 Sep 2013 09:39 PM
That was a stupid question of mine.
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
10 Sep 2013 09:41 PM
Is it a textbutton that you are applying the MouseButton1Click event to?
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