I am trying to anchor an object, and then move it. This code works, on one world/place, but when I copied it over to the other, main world/place it fails to unanchor the model. It comes back with this error message: (please mind that everything was copied correctly, the only difference between the two is that I made "ElevCar" into a model instead of a part. -Is that the problem?)
13:03:39.077 - Anchored is not a valid member of Model 13:03:39.078 - Script 'Workspace.Lift.Button.Script', Line 5 13:03:39.078 - Stack End
But, I am trying to unanchor the model "ElevCar", not find a part called "anchored" inside of it.
function onClicked()
if script.Parent.mot.Value == false then
script.Parent.mot.Value = true
if script.Parent.dir.Value == false then
**script.Parent.Parent.Model.ElevCar.Anchored = false**
wait()
script.Parent.Parent.Model.ElevCar.BodyVelocity.velocity = Vector3.new(0, 3, 0)
else
script.Parent.Parent.Model.ElevCar.Anchored = false
wait()
script.Parent.Parent.Model.ElevCar.BodyVelocity.velocity = Vector3.new(0, -3, 0)
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Here is the example on the wiki
local part = Instance.new("Part")
part.Anchored = true -- prevent it from falling
part.Parent = Workspace
Maybe you can tell me what I am doing wrong...

1 comment
Is that the same with velocity?