Touched Event - not working properly

local part = script.Parent
local humanoid
local Sensor1 = script.Parent
local Signal = script.Parent.Parent

local idk = part.Touched:Connect(function(other)
if other.Parent ~= nil then --probably won’t do anything unless you’re parenting stuff to nil on purpose
humanoid = other.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
script.Parent.Touched:Connect(function() 
script.Parent.Parent.Part.SurfaceGui.TopLabel.ImageColor = (15, 15, 15)
script.Parent.Parent.Part.SurfaceGui.BottomLabel.ImageColor = (255, 0, 0)
end)

if humanoid then
humanoid.Died:Connect(function()
idk:Disconnect()
end)
end

The connection wasn’t disconnected properly

you need to put the part in a variable first

local Touched
Touched=script.Parent.Touched:Connect(function()
--random code here
end)

and replace part.Touched:Disconnect with Touched.Disconnect()
and I really recommend that humanoid.Died:Once() is used over humanoid.Died:Connect()

also complete the functions and statements/if-statements by putting end after the code

At first i thought it was related to the Roblox bug but it’s a code error lol

For some reason, at least for me, humanoid.Health = 0 did not fire Died.
I changed it to TakeDamage(100) and it worked perfectly. Note that if you have forcefields you will not die.
So it’d be humanoid:TakeDamage(100)