I have been working on a game for about 3 weeks now, just doing it in my free time and im literally done. Except for this one big issue, its basically a murder mystery type game to tell you the least. There are an Officer and an Agent they must hunt and kill the Culprit. But when the Officer or Agent kill an innocent there supposed to die but they dont.
Heres the script thats supposed to kill them off but it doesnt seem to be working and it gives me no error so I have no clue why its not working. Its the only bug ive got left and I am really excited to finish this game up.
Heres the script
function newcharacter(bloxxedplayer, character)
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.Died:connect(function()
end)
end
end
-- Officer and agent no kill good guys
function newcharacter(bloxxedplayer, character)
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.Died:connect(function()
local tag = humanoid:FindFirstChild("creator")
if tag and tag.Value and tag.Value.Parent == game.Players then
if tag.Value ~= culprit and bloxxedplayer ~= culprit then
local wrongdoer = tag.Value
if wrongdoer.Character and wrongdoer.Character.Parent then
local wrongdoerhumanoid = wrongdoer.Character:FindFirstChild("Humanoid")
if wrongdoerhumanoid then
wrongdoerhumanoid.Health = 0
end
end
end
end
end)
end
end
Hopefully you guys may be able to help me out :) Thank you for your time.

2 comments
Where is culprit defined prior to line 17 being reached?
That is just a chunk of the script. Should I have posted the whole thing? Its 250+ lines. But its defined later on in the script.