Local Kill part not working

I made a local script of a chase sequence, there are many variables and touch functions to it; the touch functions are killing scripts and everything was working out fine except for one part that’s suppose to kill you when touched.

The parts are clones from workspace and are parented to CurrentCamera.

local Kit = workspace.Areas.Area1.ObbyStages.BallRollStage:Clone()
local BallRoll = Kit.RollingGolfBall
local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
Kit.Parent = workspace.CurrentCamera

BallRoll.Touched:Connect(function(h)
	if h.Parent:FindFirstChild('Humanoid') then
		h.Parent:FindFirstChild('Humanoid'):TakeDamage(100)
	end
end)

humanoid.Died:Connect(function()
	wait(.5)
	BallRoll:Destroy()
end)

Since this is a local script, the script resets on spawn
Is there really something wrong here or am I just dumb as heck?

It must be

BallRoll.Touched:Connect(function(h)
     local hum = h.Parent:FindFirstChild("Humanoid")
		if hum then
                  hum:TakeDamage(AMOUNT_OF_DAMAGE)
                else
            return
	end
end)

Have you tried using a server script instead of a local script? Also, where is the local script parented to?

Flag.Union.Touched:Connect(function(h)
	if h.Parent:FindFirstChild('Humanoid') then
		h.Parent:FindFirstChild('Humanoid'):TakeDamage(100)
	end
end)

I tried using the same script to another variable and it worked
But when I try it on the desired part, the function doesn’t work

The script is located on StarterGui, I like the script to reset when the player respawns

You can try this script
Simple and easy to make one.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.Humanoid:TakeDamage(100)
	end
end)

Your part must be like this :
image

You could try printing humanoid.Name and see what it prints out. You could also try using :GetPlayerFromCharacter().

The part is cloned
I want it to apply to the cloned part, plus, this script is on the client’s side, therefore when I use a regular script, other players will also die when touched even though they haven’t activated the cutscene

Is it a tool? I need to know it was a tool or not for the best script i could do for you

I just found out that I accidentally disabled the CanTouch property of the part :triumph:
Apologies for the trouble.