Why after death points leaderboard gui got reset?
Hello,
I have problem with points leaderboard gui, after death my gui show me 0, but still got all points.
Here is main script from workspace:
01 | game.Players.PlayerAdded:connect( function (player) |
02 | local leaderstats = Instance.new( "IntValue" ,player) |
03 | leaderstats.Name = "leaderstats" |
05 | local points = Instance.new( "NumberValue" ,leaderstats) |
06 | points.Name = "Points" |
09 | local P = game.StarterGui.Points.Frame.Point |
10 | P.Text = " " ..points.Value |
Here is script from StarterGUI>Points>Frame>Point :
1 | local Player = game.Players.LocalPlayer |
2 | local stats = Player:WaitForChild( "leaderstats" ) |
3 | local points = stats:WaitForChild( "Points" ) |
6 | script.Parent.Text = " " ..points.Value |
9 | points.Changed:connect(PointChange) |
Maybe i need add line somewhere, but i don't know where, becouse im beginner scripter.
Here is GIF with my problem: http://gyazo.com/c99252551e5a5bf76dee3c3b0829b9a6