i tried onTouch but it also does it for the player also.
local function PartTouched(TouchedPart) print(TouchedPart.Name .. " has touched " .. Part.Name) end Part.Touched:connect(PartTouched)
This is probably what you have so far, if you want to check the the part touching is not a player, then you must add conditions to it.
local function PartTouched(TouchedPart) local Player = Game.Players:GetPlayerFromCharacter(TouchedPart.Parent) if Player == nil then print(TouchedPart.Name .. " has touched " .. Part.Name) end end Part.Touched:connect(PartTouched)
As you see here we're checking if the touched part is a character or not by using :GetPlayerFromCharacter() which will return the Player or Nil (Allowing us to check that it is indeed a character or not)
Use this. It will check if the name is equal to the part that it needs to activate;
script.Parent.Touched:connect(function(hit) --assuming the script is inside the part that will get hit. (change it to where ever the part is) if hit.Name=="PartThatItNeedsToActivate" then --code end end)