|
| 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
|
  |
| Joined: 15 Jun 2012 |
| Total Posts: 575 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|