Expected Attachment got Part for RopeConstraint:Attachment0

happens at line 7

local Mag = (script.Parent.Center.Position-Player.Character.HumanoidRootPart.Position).magnitude
if Mag <= script.Parent.Range.Value then
local hose = Instance.new(“RopeConstraint”)
hose.Parent = script.Parent.Center
line 7 > hose.Attachment0 = game.Workspace.Doors.Model.Center
hose.Attachment1 = Player.Character.RightHand
hose.Color = BrickColor.DarkGray()
hose.Length = 35

Rope Constraints require two attachment points. Here, you are setting both Attachment0 and Attachment1 to parts. Just add an Attachment into those respective parts and set those for the rope constraint instead.

hose.Attachment0 = game.Workspace.Doors.Model.Center.Attachment

1 Like

Thanks for the fix it worked a ton!

1 Like