local morph = script.Parent.Parent:findFirstChild("Mini-Person") function touch(part) if(part.Parent:findFirstChild("Humanoid") == nil)then return end local p = game.Players:findFirstChild(part.Parent.Name) if(p == nil)then return end local m2 = morph:clone() m2.Name = part.Parent.Name m2.Torso.Anchored = false m2.Torso.Position = m2.Torso.Position + Vector3.new(18.26, 1.23, -35.73) m2.Head.Position = m2.Head.Position + Vector3.new(18.26, 1.83, -35.73) m2.Left Arm.Position = m2.Left Arm.Position + Vector3.new(17.66, 1.23, -35.73) m2.Right Arm.Position = m2.Right Arm.Position + Vector3.new(18.86, 1.23, -35.73) m2.Left Leg.Position = m2.Left Leg.Position + Vector3.new(18.46, 0.43, -35.73) m2.Right Leg.Position = m2.Right Leg.Position + Vector3.new(18.46, 0.43, -35.73) p.Character = m2 --part.Parent:remove() m2.Parent = game.Workspace m2:MakeJoints() end script.Parent.Touched:connect(touch)
The error is that it thinks that left and arm are two different things. It says "Expected '=', got 'Arm'" when I hover over it. I need the Left Arm because it doesn't could it as a humanoid if its name is LeftArm. Please help me!
Periods
can't get objects that have spaces in their names, or numbers in front of them. A good workaround for this is to use brackets
([]) to get the object you're looking for.
local morph = script.Parent.Parent:findFirstChild("Mini-Person") function touch(part) if(part.Parent:findFirstChild("Humanoid") == nil) then return end local p = game.Players:findFirstChild(part.Parent.Name) if (p == nil) then return end local m2 = morph:clone() m2.Name = part.Parent.Name m2.Torso.Anchored = false m2.Torso.Position = m2.Torso.Position + Vector3.new(18.26, 1.23, -35.73) m2.Head.Position = m2.Head.Position + Vector3.new(18.26, 1.83, -35.73) m2["Left Arm"].Position = m2["Left Arm"].Position + Vector3.new(17.66, 1.23, -35.73) m2["Right Arm"].Position = m2["Right Arm"].Position + Vector3.new(18.86, 1.23, -35.73) m2["Left Leg"].Position = m2["Left Leg"].Position + Vector3.new(18.46, 0.43, -35.73) m2["Right Leg"].Position = m2["Right Leg"].Position + Vector3.new(18.46, 0.43, -35.73) p.Character = m2 --part.Parent:remove() m2.Parent = game.Workspace m2:MakeJoints() end script.Parent.Touched:connect(touch)