I'm trying to make a block that when the hand touches it, it anchors the block, and then it sets the CFrame of that block to the hand.
script.Parent.Touched:Connect(function(hit) if hit.Name == "LeftHand" or hit.Name == "RightHand" then script.Parent.Anchored = true while true do script.Parent.CFrame = hit.CFrame wait(0.1) end end end)
I do not get any errors.
Use script.Parent.Position.CFrame
, not script.Parent.CFrame
Edit:
If it doesn't work, you can use this:
script.Parent.Position = Vector3.new(hit.Position.X, hit.Position.Y, hit.Position.Z)