Let's say I have a hammer in my hand and I want to use it to open a door by clicking the door while I have the hammer in my hand. How do I do that? Just so it's clear, I'm not asking how I make it so if I touch the door with the hammer, the properties change. All I know is I just insert a ClickDetector and that's it. When you're answering my question, please provide the script and a proper explaination, it can be really long or really short as long as it is easy to understand the script.
Try looking into mouse.target
and tool.Activaited
Example:
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse local tool = plr.Backpack.Tool tool.Activaited:Connect(function( if mouse.target == game.Workspace.part then print("we found the part!") else print("Not the part :(") end end )