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: how to work with string values?

Previous Thread :: Next Thread 
AwHellNoo is not online. AwHellNoo
Joined: 21 Mar 2014
Total Posts: 125
07 Nov 2015 03:15 PM
So script one says(btw stat is a string value):

stat = game.Workspace.stat

wait(1)
print('Alright lets do this')
wait(5)

stat.Value = "Ready"

then script two says(pow is a #value):

stat = game.Workspace.stat
pow = game.Workspace.pow

if stat.Value == "Ready" then
while true do
pow.Value = pow.Value + 1
wait(1)
end
end


But the thing is that it switches it to "ready" but the other script doesnt pick up on it. Anyone tell me why?
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Nov 2015 03:18 PM
your adding integers to a string value?!?
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Nov 2015 03:20 PM
try doing

if (stat.Value == "Ready") then

end
Report Abuse
AwHellNoo is not online. AwHellNoo
Joined: 21 Mar 2014
Total Posts: 125
07 Nov 2015 03:22 PM
@hkep

I just flippin said pow is a NumberValue, no where does it say ' add 1 to stat', stat is a string value.
Report Abuse
AwHellNoo is not online. AwHellNoo
Joined: 21 Mar 2014
Total Posts: 125
07 Nov 2015 03:23 PM
@h No it didnt work.
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Nov 2015 03:28 PM
local function StartAdding(pow)
while true do
pow.Value = pow.Value + 1
wait(1)
end
end;
if (stat.Value == "Ready") then
StartAdding(pow);
else
while not (stat.Value == "Ready") do
stat.Changed:wait();
end;
StartAdding(pow);
end
Report Abuse
AwHellNoo is not online. AwHellNoo
Joined: 21 Mar 2014
Total Posts: 125
07 Nov 2015 03:37 PM
@h Hm, aint working either. I'll just use an alternative method. Thanks for at least trying to help.
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