How can I make that when a Part touches another part, it can do something like Humanoid.Tuched?

Hi, I need help with this. I have an idea, and the idea is that a part when playing another part, makes a function as if the character was playing it, but whoever played it was the part, how can I do that?

1 Like

A bit confused on how you worded this

Are you wanting to control a part depending on whoever first touched it?

Well. I will explain better, I want to do something similar to when the character touches an object being able to use Humanoid.Touched. but instead of the character touched, be a part.

Isn’t this just BasePart | Roblox Creator Documentation ? The only special thing about Humanoid | Roblox Creator Documentation is that it returns

### touchingPart Instance The BasePart the Humanoid has come in contact with
### humanoidPart Instance The limb of the Humanoid that has been touched

You can basically do the same with .Touched if you include the part the event is connected with

local function onTouch(hitPart,partWithTouchedEvent)
print(partWithTouchedEvent," has hit: ",hitPart)
end
  
part.Touched:Connect(function(hitPart)
onTouch(hitPart,part)
end)
1 Like