I'm trying to move a part for Z+0.001 and that works, but I want to make it so if the position is -29.185, 114.095, 85.489 then it will teleport part back to -29.185, 114.095, 0.927 where he started. But it sends me this error:
- Trying to call method on object of type:
Vector3with incorrect arguments. - Stack Begin -.......Part.Script', Line 9
- Stack End
local part = script.Parent
local X = part.Position.X
local Y = part.Position.Y
local Z = part.Position.Z
while true do
wait(0.1)
part.CFrame = CFrame.new(X, Y, Z+0.001)
if part.Position(-29.185, 114.095, 85.489) then -- This is the position that when parts goes to, then it turns him back to his starting position
part.CFrame = CFrame.new(-29.185, 114.095, 0.927) --Starting position
end
end
Can someone help me plz?

1 comment
It's not working, part moves for Z+0.001 but almost instant teleports back to starting position