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!

5 comments
Can you put the bit where the error occurred back in so the error makes sense?
I did not remove it from this script. The error is at line 11.
This script is the on that doesn't work at all. No modifications!
weld.Part1 has to be a base part (object) not a CFrame
Yes. Thank you.