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 would I add this?

Previous Thread :: Next Thread 
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
14 Mar 2016 01:42 PM
I want to add if the leaderstat XP is *100 more than the leaderstat levels then XP = 0.
to this
script.Parent.Parent.Text = script.Parent.Value
script.Parent.Changed:connect(function()
script.Parent.Parent.Text = script.Parent.Value
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("leaderstats"):WaitForChild("XP").Value = script.Parent.Value
end)
Report Abuse
Scerzy is not online. Scerzy
Joined: 27 Dec 2010
Total Posts: 1082
14 Mar 2016 01:47 PM
We don't know anything about this script because you haven't told us what's the parent of what and what's changing
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
14 Mar 2016 01:56 PM
well the script.parent is the value.

so I'd say something like this

if leaderstat.XP = 100* leaderstat levels, then script.Parent.Value = 0

but idk how to finish it.

script.Parent.Value is XP, I have two XP values, but don't worry about that.

I just want script.Parent to = 0 if the leaderstat = -0
Report Abuse
Scerzy is not online. Scerzy
Joined: 27 Dec 2010
Total Posts: 1082
14 Mar 2016 01:59 PM
Add in another change function. If the leaderstat level changes, then subtract the amount of XP required to advance to that level from the exp the dude has

So for example if you need 200 exp to go from level 1 to 2, when that level changes, subtract 200 exp from the total exp the player has.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
14 Mar 2016 02:03 PM
Yes I know that, but I don't know how to get to the leaderstats, like I have a leaderstat script but I don't know how to get to it.

like

leaderstat.XP or do I have to call the leaderstat I don't know how to do that.
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