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: Adding string

Previous Thread :: Next Thread 
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 10:22 PM
Could this work? I don't think it is Vector3 though, what would that be?
function always()
while wait(10) do
script.Parent.Text = script.Parent.Value.Value
if script.Parent.Parent.job.Text == "Clothes Clerk" then
script.Parent.Value.Value = script.Parent.Value.Value + Vector3.new(30)
end
end
end
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:25 PM
Firstly, what are you trying to do?
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 10:27 PM
So the text = the strings value so that every 10 seconds it will go up 30 if the person is a clothes clerk
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:37 PM
I'll type up the script. Give me a moment.
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:40 PM
One question before I continue, what is the heiarchy?
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 10:41 PM
So parent is money the parent of money is screengui
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:44 PM
But what is money? A textbox?
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 10:45 PM
Oh, money is a text label
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:49 PM
k. I'll make the script now
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:52 PM
Has a 50/50 chance of working. tell me if it doesnt, and if it doesnt, try seeing the error by pressing F9.



wait(2)

function al_ways()
plr = game.Players.LocalPlayer
i = 0
if script.Parent.Parent.job.Text == "Clothes Clerk" then
a = script.Parent.Value
i = i + 30
a.Value = tostring(i)
end
end


while wait(10) do
al_ways()
end
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 10:53 PM
And this is assuming the script is inside the player somewhere.
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 10:56 PM
The script is inside of playeGui, also it didn't work, and is there a way so that maybe an elseif they are a different job it goes up a different amount?
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
08 Jul 2014 10:58 PM
That'll make A's value always be 30 if the job is "Clothes Clerk". You're setting I to 0 every time.
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 11:05 PM
Pehhh im tired and I'm multitasking roblox programming and a class...
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
08 Jul 2014 11:06 PM
How about this, how do you add like UDim2.new(0,0,0,0) for somethigns what would backroundTransparency be? to +
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
08 Jul 2014 11:06 PM
wait(2)

i = 0
function al_ways()
plr = game.Players.LocalPlayer
if script.Parent.Parent.job.Text == "Clothes Clerk" then
a = script.Parent.Value
i = i + 30
a.Value = tostring(i)
elseif script.Parent.Parent.job.Text == "Job2" then --add more jobs like this
a= script.Parent.Value
i = i + 40 --saying that job2 gives 40 money
a.Value = tostring(i)
end
end


while wait(10) do
al_ways()
end
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