Moving platform issue

Trying to figure out why the platform in my test model does slide back and forth. It currently goes from a starting point to the destination OK, but rather than sliding back it jumps back to the start position… so if a player is riding the platform and the platform jumps over, the player simply falls.

RobloxStudioBeta_ykkK9nqFgd

local model = script.Parent

local platform = model.Platform
local positionA = model.PlatformStart.Position
local positionB = model.PlatformEnd.Position

while true do
    platform.Position = positionB
    wait(6)
    platform.Position = positionA
    wait(6)
end

Any ideas would be greatly appreciated :beers: