I'm trying to make a nuke that calls :BreakJoints() on humanoids in game. I keep getting this error though not sure what I'm doing wrong.
13:20:57.457 - Workspace.Brick.Script:23: attempt to index global 'death' (a function value) 13:20:57.457 - Stack Begin 13:20:57.458 - Script 'Workspace.Brick.Script', Line 23 13:20:57.458 - Stack End
function Cough(Part)
local fries = Instance.new('Message')
fries.Parent = game.Workspace
fries.Text = "Hello I will now explode"
wait(3)
fries:Destroy()
local explosion = Instance.new('Part', game.Workspace)
Part = explosion
Part.Anchored = true
Part.Shape = 'Ball'
Part.Transparency = 0.1
Part.TopSurface = "Smooth"
Part.BottomSurface = "Smooth"
Part.CanCollide = false
while true do
Part.Size = Part.Size + Vector3.new(10,10,10)
wait()
end
end
hum = game.Workspace:FindFirstChild("Humanoid")
function death(hum)
if death.Touched:FindFirstChild(hum)then
hum:BreakJoints()
end
end
script.Parent.Touched:connect(Cough)
game.Workspace.Brick.Touched:connect(death)
wait(10)

7 comments
I am trying to do a check for if the part was touched by a humanoid. And if you can I cant figure out how to make the function happen once instead of happening thousands of times when you step on the brick.
Ohh ok
well do you know how i can fix it? xd
I DID I JUST MADE AN EDIT Ok?
bud i asked becuase you didn't fix it, OK?
DID YOU EVEN COPY THE NEW SCRIPT?
Yeah I did it still doesn't work for me. PLUS I already made a different version and that still doesn't work