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: I want to add a level system that will save to my game...

Previous Thread :: Next Thread 
KyleThe3912 is not online. KyleThe3912
Joined: 03 Aug 2014
Total Posts: 7
10 Nov 2015 07:59 PM
I am trying to plan on adding a level system that adds experience points and will save to my place, Like what I saw on Epic Minigames.
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
10 Nov 2015 08:11 PM
http://wiki.roblox.com/index.php?title=Leaderboard

and

http://wiki.roblox.com/index.php?title=Data_persistence
Report Abuse
LilMcManiac is online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
10 Nov 2015 08:11 PM
Ok, so first you would need to add the leaderstats

Regular script in the Workspace


game.Players.PlayerAdded:connect(function(plr)
stats=Instance.new("Model", plr)
stats.Name='leaderstats'
level=Instance.new("NumberValue",stats)
level.Name="Level"
level.Value=0
experience=Instance.new("NumberValue",stats)
experience.Name="Experience"
experience.Value=0
--Now time for the level up math
goal=20
if experience.Value<=goal then
experience.Value=experience.Value - goal
goal = goal + 20
level.Value = level.Value + 1
wait()
end)
end
Report Abuse
KyleThe3912 is not online. KyleThe3912
Joined: 03 Aug 2014
Total Posts: 7
10 Nov 2015 08:20 PM
It does not work...
Report Abuse
LilMcManiac is online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
10 Nov 2015 08:21 PM
You need to get the experience up to 20, then it will level up..
Report Abuse
KyleThe3912 is not online. KyleThe3912
Joined: 03 Aug 2014
Total Posts: 7
10 Nov 2015 08:23 PM
I don't see the experience on the stats
Report Abuse
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
10 Nov 2015 08:29 PM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
SummerEquinox is online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
10 Nov 2015 08:32 PM
https://jet.com/product/detail/e7910d980df64ff6b3dade8bb0a04363?jcmp=pla:ggl:media_a3:books_computers_technology_a3_other:na:na:na:na:na:2&code=PLA15&k_clickid=dcfb39f1-3a97-4f21-a73a-8f081c5a2c81&gclid=Cj0KEQiAyIayBRDo4vjdqJrgxZ0BEiQAhOYCYPmdgpw2owo4BIVjmzoGwIEdFRig1lBEMLcuBCGtFyIaAjMD8P8HAQ


it is an undeniable, and may I say a fundamental quality of man, that when faced with extinction, every alternative is preferable.
Report Abuse
jjkiki is not online. jjkiki
Joined: 19 Oct 2012
Total Posts: 216
10 Nov 2015 08:32 PM
Kyle, you have to have a working exp giver, and then lilmc's script should work
Report Abuse
KyleThe3912 is not online. KyleThe3912
Joined: 03 Aug 2014
Total Posts: 7
10 Nov 2015 08:39 PM
Oh
Report Abuse
LilMcManiac is online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
10 Nov 2015 08:43 PM
Put this in any brick you want to give ExPeRiEnCe!

script.Parent.Touched:connect(function(touch)
if touch.Parent:findFirstChild("Humanoid") then
char = touch.Parent
player = game.Player:GetPlayerFromCharacter(char)
if player:FindFirstChild("leaderstats") then
stats = player.leaderstats
exp = stats.Experience
exp.Value = exp.Value + 10 --Can Change to whatever you want
end
end
end)
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
11 Nov 2015 05:27 AM
Lol darth the comedian, yet so on point.
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