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 make it so when my duplicated tool handle touches a brick, something happens?

I have it so when I click on a tool, it duplicates the tool, and it drops right in front of me. I want it so when the duplicated tool handle touches the brick, something happens to it. This is the code that I have so far and does not seem to work.

script.Parent.Touched:Connect(function(hit)
	if hit:IsA("UnionOperation") then
		if hit.Name == "Handle" then
			script.Parent:Destroy()
		end
	end
end)

1 answer

The issue that I was having is solved, and the reason their was an issue is because I was using a local script to clone the tool, which only made it client side, and the server did not detect it being created. I also had to use a remote event to fire the server.

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