Hey, I am following a tutorial, and in the tutorial, it works totally fine, but for me, I get this error:
** Workspace.Part.Script:14: bad argument #3 to 'Part1' (Object expected, got CFrame)
Why? This is my script:
script.Parent.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then local head = humanoid.Parent.Head local weld = Instance.new("Weld") weld.Part0 = head weld.C0 = head.CFrame:inverse() weld.Part1 = script.Parent.CFrame:inverse() weld.C1 = script.Parent.CFrame:inverse() weld.Parent = head script.Parent.Anchored = false end end)
Why doesn't it work? I removed the CFrame bit, where the error occurred, but then the welded brick didn't follow my CFrame coordinates. PLEASE HELP!
Mate, you gave a CFrame on line 11, it specifically says "Part1" not C0/1, give an object not a rotational direction.