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: Whats wrong???

Previous Thread :: Next Thread 
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 01:43 PM
The health and level show up fine but when you go into workspace --> Players --> Your player name ---> Leaderstats2 ---> Level and change it to 2
the health stays at 150 and the level stays at 1 appearing on the textlabels



local player=game.Players.LocalPlayer
local char=player.Character or player.CharacterAdded:wait()
local hum=char:WaitForChild("Humanoid")
local pgui=player.PlayerGui

local holder=pgui.Level.Holder
local lgui=holder.Level
local dgui=holder.Damage
local hgui=holder.Health
local lstats=player:WaitForChild("leaderstats2")
local level=lstats:WaitForChild("Level")

if level.Value<1 then level.Value=1 end

local health=level.Value*150
hum.MaxHealth=health
hum.Health=health

local function onhealth()
hgui.Text="Health: "..tostring(math.floor(hum.Health+0.5)).."/"..tostring(hum.MaxHealth)
lgui.Text="Level: "..level.Value
end
onhealth()
hum.HealthChanged:Connect(onhealth)



Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 01:57 PM
qq


Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 02:13 PM
2


Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 02:26 PM
3


Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 02:37 PM
!!


Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 02:43 PM
a


Report Abuse
TheDancingPumpkinMan is not online. TheDancingPumpkinMan
Joined: 05 Aug 2009
Total Posts: 27579
20 Jun 2017 02:46 PM
does no1 know qq


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