So my local script in the starterGUI is not giving XP on death of their own character. So when a person kills them, they get rewarded the XP. There are no errors so im guessing there is a problem at the "WaitForChild". I also tried to retrieve a value for "Character ". it returned nil
isDead = false x = game.Players.LocalPlayer Character = x:WaitForChild("Character") -- Problem? Humanoid = Character:FindFirstChild("Humanoid") Humanoid.Died:connect(function(onDeath) if not isDead then isDead = true local tag = Humanoid:findFirstChild("creator") if tag ~= nil then local Folder = tag.Value:FindFirstChild("Folder") if Folder then Folder.CurrentXP.Value = Folder.CurrentXP.Value + 1 end end end end)
~ Thx, Bubs