This script works only when in the workspace but I need it to work while being used as a tool
Here is the script:
function crash(hit)
if hit.Name == "Wheel" then
hit.Parent.Parent:Destroy()
print("Wheels gone")
end
end
script.Parent.Touched:connect(crash)

13 comments
does it have to do with what script.Parent.Parent is referring to? make sure it still has the reference it needs
It's supposed to pop the wheels of a moving car but it only works when it's placed on the ground in workspace
what happens when u test it on tool
When I use it as tool it simply does nothing
any errors in output? can you send a link to an image of the car and its childs in explorer
rather than a touched event, you need an Activated event. tools are activated
No errors at all
@Spiritlotus Probs send that in Answers
you need to rewrite it so that on activation it does something to the wheel.
It doesn't really serve the purpose of being a tire popping tool then
I need it to pop any car tire that touches the part while the tool is being held
you could get the players mouse on tool.Activated. if the mouse.Hit is a wheel, then delete it. this should be enough to get you started, as this isnt a request site. accept my answer if all went well :)
or check if the Handle of the tool touched a wheel on activation