Hello! I would like to make that when clicking on a specific part (part 1) only if it is touched by part2 at the moment of the click, the part2 is thrown away, how can I do something like that?
I would like it to be thrown away like when you throw a ball, this is for a baseball game and I want to do that when the bat tool touches the box and if at that moment the ball also touches the box then the ball is thrown far in the direction positive x
local part = script.Parent local click = part.ClickDetector local function throwAway () -- code here end click.MouseClick:Connect(throwAway)