How to make Kill cam

Okay! I think I see the problem.
Essentially, what’s happening is that it’s not marking the character as being killed from the player responsible. This is a simple fix, so I’ll do it for you:
If it doesn’t work, lmk!!

script.Parent.blade.Touched:connect(function(p)
	if script.Parent.CanDamage.Value == true then 
		if p.Parent:FindFirstChild("Humanoid") then
		-- checking that this blow would kill
			if p.Parent.Humanoid.Health - 35 <= 0 then
				-- ensuring it's a player that killed you.
				local Player = game.Players:GetPlayerFromCharacter(p.Parent)
				if Player then
					local CreateValue = Instance.new("ObjectValue")
					CreateValue.Name = "creator"
					CreateValue.Parent = p.Parent.Humanoid
					CreateValue.Value = Player
				end
		
			end
   p.Parent.Humanoid:TakeDamage(35) 
			script.Parent.CanDamage.Value = false 
			end
      end 
 end) 
1 Like