01 | function playerAdded(plr) |
02 |
03 | local stats = Instance.new( "IntValue" , plr) |
04 | stats.Name = "leaderstats" |
05 |
06 | local money = Instance.new( "IntValue" , stats) |
07 | money.Name = "Jump Power" |
08 | money.Value = game.Players.LocalPlayer.Character.Humanoid.JumpPower |
09 |
10 | end |
11 |
12 | game.Players.PlayerAdded:connect(playerAdded) |
Hello, jalbraek!
Try this:
01 | function playerAdded(plr) |
02 |
03 | repeat wait() until plr.Character --Waits for player character |
04 |
05 | local stats = Instance.new( "Folder" ) --Leaderstats is a folder, not a IntValue and the Parent property of the Instance.new is deprecated.. you should not use it |
06 | stats.Name = "leaderstats" |
07 | stats.Parent = plr |
08 |
09 | local money = Instance.new( "IntValue" ) -- The parent property of the Instance.new is deprecated.. you should not use it |
10 | money.Name = "Jump Power" |
11 | money.Value = plr.Character.Humanoid.JumpPower |
12 | money.Parent = stats |
13 |
14 | plr.Character.Humanoid.Changed:Connect( function () --Makes it update on changed(I saw you want it on the duplicate of this question) |
15 | money.Value = plr.Character.Humanoid.JumpPower |
16 | end ) |
17 |
18 | end |
19 |
20 | game.Players.PlayerAdded:connect(playerAdded) |
Good Luck with your games