Hi,
I copy-pasted the exact script from Roblox education site but it doesn't work. The script is in the workspace
local trap = script.Parent -- Checks for Humanoid in otherPart local function onTouch(otherPart) -- Store parent of otherPart local character = otherPart.Parent -- Looks for a humanoid local humanoid = character:FindFirstChil("Humanoid") if humanoid then -- If part has humanoid, set health to 0 humanoid.Health = 0 end end -- Connect the Touched event to onTouch trap.Touched:Connect(onTouch)
Try looking at this model
https://www.roblox.com/library/339702422