Okay, so I know I'm not the best scripter but I tried my hardest and I can't seem to get this to work. I'm not even sure how off I am from getting it. The script is supposed to show a GUI to the player responsible for the death of a NPC when said NPC dies. However, I can't get it to work; can someone please help me? (I'm sorry if my script is horribly wrong)
Script:
local Humanoid = script.Parent.Humanoid -- NPC Humaniod Name
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local MoveTo = tag:findFirstChild("PlayerGui")
if MoveTo ~= nil then
local gui = script.KillNoteGui:Clone()
gui.Parent = MoveTo
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)

2 comments
Please provide any errors from the output, etc...
Nothing in the output is related to the script. That's another reason as to why I can't figure out how to do it.