i don't know programming too much so i tried this
script.Parent.Touched:connect(function(hit) if hit and hit.Parent:FindFirstChild('Humanoid') then script.Parent:Destroy(game.Workspace.Trigger) end end)
but it didnt work can someone help ???
You have to create a variable for the part you want to destroy. So like this:
local Trigger = game.Workspace.Trigger script.Parent.Touched:connect(function(hit) if hit and hit.Parent:FindFirstChild('Humanoid') then Trigger:Destroy() end end)
This should work and if it doesn't just let me know