script.Parent:Destroy() isn't working on a tool

Hello,

This may sound like I don’t belong here but I’m doing this very VERY simple script that for some reason doesn’t work.

script.Parent.Unequipped:Connect(function()
script.Parent:Destroy()
end)

It’s supposed to delete the tool from your inventory when you unequip the tool but it instead destroys the Handle. Is the :Destroy() broken?

2 Likes

Where is your script located ?

I’ve tried LocalScript and Script, they both don’t seem to do anything.

1 Like

thats not the answer i was looking for haha. Where is your script located ? Could you send a screenshot ?

1 Like

I misread alright, It’s located inside the tool.

image

1 Like

k so i typed this in a script and it worked :slight_smile: parent of the script is the tool

script.Parent.Unequipped:Connect(function()
wait()
script.Parent:Destroy()
end)

Bro, I hate that wait(), anyways thanks!

2 Likes