Why did I get this error?

Im trying to make a Kill streak system while using the “creator” ObjectValue, so in 5 seconds, if Kills = 3 then the player will be awarded with a badge, but for now being a print function.

Why did I get this error though/

Script

local RunService = game:GetService("RunService")

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:WaitForChild("Humanoid").Died:Connect(function()
			if character.Humanoid:FindFirstChild("creator") then
				local Player = character.Humanoid.creator.Value
				local killerCharacter = Player:GetCharacterFromPlayer(Player)
				local Kills = killerCharacter:WaitForChild("kills")
				
				Kills += 3
				
				local creator = character.Humanoid:FindFirstChild("creator")
				
				while task.wait() do
					if creator and killerCharacter then
						task.wait(6)
						if Kills == 3 then
							print("yay")
						end
					end
				end
			end
		end)
	end)
end)

This isn’t an actual function. Instead do

Player.Character
3 Likes

Do you know why I can’t add to a Int Value?

Because I made a new instance called kills thats a IntValue, and when I tried adding a value to it, it didn’t seem to work and threw this error.

You did IntValue += 3, instead of IntValue.Value += 3.

2 Likes