Touched event only firing when the part touches a player character part

for some reason when i make a local script in roblox studio and put the touched even whenever i print the hit part it only prints the player character parts such as “Left Leg”
but when the part touches an another part nothing prints

heres the script


local Part = script.Parent

Part.Touched:Connect(function(hit)
	
	print(hit) -- this is a raw print without any if statements so it should print without any problems
	
	if hit:GetAttribute("NoCollide") == true then

		Part.BrickColor = BrickColor.new("Really red")

	else

		Part.BrickColor = BrickColor.new("Dark green")

	end
end)

Have you tried GetTouchingParts instead of Touched?

Seems to work as intended when I tried it. Did you add a script then set the run context to client or did you add a ‘LocalScript’?

never mind guys thanks for the help i just used getpartsinpart and thats it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.