Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Level gui system help?

Asked by 9 years ago

Long story short, im making a game where theres a level up system based on kills and I use the script

01local maxlevel = 100
02game.Players.PlayerAdded:connect(function(player)
03    local stats = Instance.new("IntValue", player)
04    stats.Name = "leaderstats"
05 
06    local level = Instance.new("IntValue", stats)
07    level.Name = "Level"
08    level.Value = 1
09 
10    local exp = Instance.new("IntValue", stats)
11    exp.Name = "Exp"
12    exp.Value = 0
13 
14    while wait() do
15        local extralevel = level.Value
View all 24 lines...

2 questions: 1, I made a working gui version of displaying the level, HOWEVER it wont update when you level up it works the first time but wont no more, help, to go along with the leveling up. 2, Using this script how would I make it so if you kill someone you get exp?

0
Can you show the script for the gui. Also you can use the Died Event on Humanoids to get Exp on kill yoshi8080 445 — 9y

1 answer

Log in to vote
0
Answered by
Aepeus 59
9 years ago

Not sure as you don't have the script for the display but hopefully this fixes your problem.

01local player = game.Players.LocalPlayer
02local stats = player:WaitForChild("leaderstats")
03local level = stats:WaitForChild("level") -- change level to your statname
04 
05function update()
06script.Parent.Text = level.Value
07end
08 
09update()
10level.Changed:connect()
Ad

Answer this question