I'm trying to add two different variables together but nothing works out.
Here's the script. Look at lines 16-20
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
-- Display an 'IntValue' on leaderboard
local Power = Instance.new("IntValue")
Power.Name = "Power"
Power.Value = 150
Power.Parent = leaderstats
player.CharacterAdded:connect(function(Character)
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.Died:connect(function()
if Humanoid:FindFirstChild("creator") ~= nil then
local Killer = Humanoid.creator.Value
local killerpoints = Killer.leaderstats.Power.Value
local deadpoints = Power.Value
killerpoints = killerpoints + deadpoints -- Add dead players points to killer's points
end
Power.Value = 0 --Set dead player's points to zero
end)
end)

2 comments
remove the .Value part from the variable. Then when you add them, add the .Value there. This might work
I said to change it for lines 16 and 17, not 15, 15 should stay the same