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
 

XP Bar Script

Previous Thread :: Next Thread 
gloriousryan is not online. gloriousryan
Joined: 28 Feb 2010
Total Posts: 299
07 Jul 2016 01:06 PM

Im using this script to make a basic xp bar that works like on most roblox rpg's/ minigames.

I figured that it wouldnt be a good idea to post 20+ line of code so here is a link to a website with it

[Warning: Offsite Link]
https://codeshare.io/JJy0g
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
07 Jul 2016 01:07 PM
what about it


inhale
Report Abuse
gloriousryan is not online. gloriousryan
Joined: 28 Feb 2010
Total Posts: 299
07 Jul 2016 01:09 PM
The problem is it detects the exp and changes it like 200/300 but when I level up the first time it doenst change at all including the maxexp and the exp
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
07 Jul 2016 01:11 PM
first of all, i suggest using a value inside of the player sorted like this


ServerStorage.PlayerName > ExpValues > {Max,Current}


to prevent exploits, and then when it changes, fire an event to change use a handle to detect, fire the client when you want it to change and then boom it will change like that...

a lot more secure


inhale
Report Abuse
gloriousryan is not online. gloriousryan
Joined: 28 Feb 2010
Total Posts: 299
07 Jul 2016 01:14 PM
Could you give me a example i havent gotten into using that kind of code (server storage and events)
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
07 Jul 2016 01:19 PM

SERVER SCRIPT>

game.Players.PlayerAdded:connect(function(player)
local val = Instance.new("StringValue", game.ServerStorage.ExpValues)
val.Name = player.Name
local Max = Instance.new("NumberValue", val)
local Min = Instance.new("NumberValue", val)
Max.Name = "Maximum"
Min.Name = "MinXP"
--[[
CREATE A DATASTORE SYSTEM TO LOAD THE PLAYERS EXP THAT THEY HAVE IF U WANT, OR ELSE IT WILL JUST SET TO 0 IF THE REJOIN
]]
end)

there u go.
thats how to setup the stuff.



inhale
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