OBBY
Moving Platform
Paste as a Script inside a part. The part is anchored and tweened back and forth. Change OFFSET and DURATION at the top.
-- Paste as a Script inside the moving part.
local TweenService = game:GetService("TweenService")
local OFFSET = Vector3.new(0, 0, 24)
local DURATION = 3
local part = script.Parent
if not part or not part:IsA("BasePart") then
return
end
part.Anchored = true
local tween = TweenService:Create(
part,
TweenInfo.new(DURATION, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true),
{ Position = part.Position + OFFSET }
)
tween:Play()