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: Why does this only run once?

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 07:35 PM
I've already made the XP Value over 500 and it still only makes it 1 + lvl and not 5 +..

plr = script.Parent.Parent.Parent
while plr.XP.Value ​>= 100 do
plr.leaderstats.Level.Value = plr.leaderstats.Level.Value + 1
plr.XP.Value = 0
end
Report Abuse
skipperguy12 is not online. skipperguy12
Joined: 09 Oct 2009
Total Posts: 955
30 Nov 2011 07:43 PM
Not sure, but check capitals for leaderstats, try Leaderstats.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 07:44 PM
Are you stupid? If I use a capital L for leaderstats it wont work.
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
30 Nov 2011 07:45 PM
Don't be rude. He is just trying to help..
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 07:48 PM
because it runs whenever the xp > 100 but if u reach that it changes it back to zero
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 07:48 PM
-.- You're lucky I like grimm and I listen to him -.-..
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 07:50 PM
otherwise just use this
plr = script.Parent.Parent.Parent
while wait() do
if plr.XP.Value ​>= 100
plr.leaderstats.Level.Value = plr.leaderstats.Level.Value + 1
plr.XP.Value = 0
else
end
end
Report Abuse
skipperguy12 is not online. skipperguy12
Joined: 09 Oct 2009
Total Posts: 955
30 Nov 2011 07:56 PM
=\, its ok grim. Let him yell if he wants. Its only going to hurt him....

True, I was just trying to help. If it doesnt work, sorry, go ask thenewscripter, hes a genious.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 07:58 PM
Call, That doesn't work D:
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 08:01 PM
any output?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 08:01 PM
Nope.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 08:01 PM
Nope.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 08:02 PM
wait I think I just found out what you want try this?

plr = script.Parent.Parent.Parent
while plr.XP.Value ​>= 100 do
plr.leaderstats.Level.Value = plr.leaderstats.Level.Value + 1
plr.XP.Value = plr.XP.Value - 100
end
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 08:05 PM
Ty, but It still only works once.. and no output.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 08:09 PM
hmm maybe this then?

plr = script.Parent.Parent.Parent
while wait() do
if plr.XP.Value ​>= 100
plr.leaderstats.Level.Value = plr.leaderstats.Level.Value + 1
plr.XP.Value = plr.XP.Value - 100
end
end
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 08:12 PM
Thank you! It's working.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 08:14 PM
no problem good luck with your game im guessing an RPG or so?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
30 Nov 2011 08:14 PM
Yup.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
30 Nov 2011 08:19 PM
if you need any more help just pm me (NO I WILL NOT JUST MAKE YOU STUFF!)
well I might make you something if its relativly easy
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