function Reward() Humanoid = script.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then Creator = Humanoid:FindFirstChild("creator") if Creator ~= nil then if Creator.Value ~= nil then local leaderstat = Creator.Value:FindFirstChild("leaderstat") if leaderstat ~= nil then if Creator.Value.Character ~= nil then leaderstat.Jewel.Value = leaderstat.Jewel.Value + 100 end end end end end end
script.Parent.Humanoid.Died:connect(Reward)
Location of what i'm trying to get too: game.Players.LocalPlayer.leaderstat.Jewel.Value
NOTE: No errors in output :/
Your code is confusing please refine what you want to happen. I think this is what you want?
LOCAL SCRIPT
game.Players.LocalPlayer.Character.Humanoind.Died:connect(function() if game.Players.LocalPlayer:FindFirstChild("leaderstats") and game.Players.LocalPlayer:FindFirstChild("leaderstats"):FindFirstChild("Jewel") then game.Players.LocalPlayer.leaderstats.Jewel.Value = game.Players.LocalPlayer.leaderstats.Jewel.Value + 100 end end)