Yes. Having 2 parts with the same name will “confuse” the script. Name each part differently to avoid this issue.
There is no problem when :
The parent of the part you want to define has the same name of the other part’s name
Example : Two parts named Ragdoll are parents of two parts, Part1 and Part2
One of the defined part is in a different folder/model/part than the other part.
There will be an issue when :
The part you define has the same name of any part in the same folder/model/part
The parts you define are named identically
Example :
local Part = game.Workspace.Model.Part
local RandomPart = game.Workspace.Model.Part
You define the same part two times. In this case, the script will take the last version which you have defined it