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 » Scripters
Home Search
 

Re: y doesn't this work?

Previous Thread :: Next Thread 
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 04:56 PM
local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player.PlayerGui
-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")
-- System Stuff
local BankingSystem = Player:WaitForChild(""..Player.Name.."'s System")
local InBankCash = BankingSystem:FindFirstChild("InBankCash")

InBankCash.Changed:connect(function()
CurrentAmount.Text = tonumber(InBankCash)
end)

... Uhhhh I really got no idea what went wrong.

I stole YOUR siggy!
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 05:04 PM
helppp

I stole YOUR siggy!
Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
19 Jun 2015 05:07 PM
Uhm. Setting text to a number? Did you mean tostring?

I have no idea what you did to be honest but check that first ^-^
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 06:26 PM
Oh.

I stole YOUR siggy!
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 06:27 PM
Nope, it didn't change.

I stole YOUR siggy!
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 06:30 PM
Hellpp. q.q

I stole YOUR siggy!
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
19 Jun 2015 06:32 PM
local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player:WaitForChild("PlayerGui")
-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")
-- System Stuff
local BankingSystem = Player:WaitForChild(Player.Name.."'s System")
local InBankCash = BankingSystem:WaitForChild("InBankCash")

InBankCash.Changed:connect(function()
CurrentAmount.Text = tostring(InBankCash)
end)
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 06:52 PM
Doesn't work, @Above

Idk. All it's supposed to do is change the text of the TextLabel to the value of the InBankCash.

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 06:55 PM
Is InBankCash a value?
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 06:57 PM
Yes.

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:00 PM
local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player.PlayerGui
-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")
-- System Stuff
local BankingSystem = Player:WaitForChild(""..Player.Name.."'s System")
local InBankCash = BankingSystem:FindFirstChild("InBankCash")

InBankCash.Changed:connect(function()
CurrentAmount.Text = "" .. tostring(InBankCash.Value) .. ""
end)
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 07:03 PM
Still not working. Also, why are you guys saying tostring. It's making sure the text on the textbox is a number, so tonumber

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:06 PM
Anything in the output?
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:06 PM
Your previous post didn't make any sense...
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 07:07 PM
Nothing at all.

It's not good when the output is silent.

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:09 PM
Maybe you should give the whole gui with the scripts in a model...
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 07:11 PM
Maybe I shouldn't since I got trust issues.

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:11 PM
Guess you won't get it fixed.
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:14 PM
Try InBankCash.Value.Changed if not then idk.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 07:14 PM
It's not a long script. Nobody has given me a right script yet.

Should be fairly easy to fix as well.

First attempt with using tostring and tonumber, and people were telling me to use tonumber and not tostring because tostring is changing a number to text.

I stole YOUR siggy!
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:17 PM
Does that work?
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
19 Jun 2015 07:19 PM
It didn't. Idk.

I stole YOUR siggy!
Report Abuse
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
19 Jun 2015 07:22 PM
local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player.PlayerGui

-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")

-- System Stuff
local BankingSystem = Player:WaitForChild(""..Player.Name.."'s System")
local InBankCash = BankingSystem:FindFirstChild("InBankCash")

InBankCash.Changed:connect(function()
CurrentAmount.Text = InBankCash.Value
end)

That will work. I know for a fact, as I tried it.
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:23 PM
--Try this:

local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player.PlayerGui
-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")
-- System Stuff
local BankingSystem = Player:WaitForChild(""..Player.Name.."'s System")
local InBankCash = BankingSystem:FindFirstChild("InBankCash")

InBankCash.Value.Changed:connect(function()
CurrentAmount.Text = tostring(InBankCash.Value)
end)

--If not, then it probably got messed up by your waitforchilds.
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
19 Jun 2015 07:25 PM
--Or this:

local Player = script.Parent.Parent.Parent.Parent.Parent
local PlayerGui = Player.PlayerGui
-- Getting stuff from the PlayerGui
local BankSystemGui = PlayerGui:WaitForChild("BankSystemGui")
local TakeOut = BankSystemGui:WaitForChild("TakeOut")
local Out1 = TakeOut:WaitForChild("TakeOut1")
local Out2 = TakeOut:WaitForChild("TakeOut2")
local CurrentAmount = TakeOut:WaitForChild("CurrentAmount")
-- System Stuff
local BankingSystem = Player:WaitForChild(""..Player.Name.."'s System")
local InBankCash = BankingSystem:FindFirstChild("InBankCash")

repeat
CurrentAmount.Text = tostring(BankingSystem.InBankCash.Value)
wait()
until
script == nil
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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