Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I remove a tool while equipped without it bugging out?

I'm scripting for a cafe and when this blender removes the tool only the parts inside the tool are removed, leaving the empty tool in your toolbar.

Here's the code

script.Parent.Touched:connect(function(h)
	local name = h.Parent.Name

if string.find(name, "Apple") then
	h:Remove()
 print("Blending")
end
end)

1 answer

script.Parent.Touched:Connect(function(h)
	if h.Parent.Name == "Apple" then
		h:Destroy()
	print("Blending")
	end
end)

dont need to do string.find, just check if the name variable is Apple also, "connect" is deprecated, instead use "Connect" the difference is an uppercase C instead of a lowercase c

1 comment

0

This didn't fix the problem I had with deleting the tool. Thanks for the help though.

This discussion is preserved as it was. New answers, comments, and votes are closed.