Platforma w Roblox z TweenService

local part = script.Parent
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(3.0, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, true, 0.2)
--1 how long it’s going to take to move the platform between two positions
--2 easing style (whether the movement is going to be smooth, linear, or random)
--3 easing direction and we choose ‘Out‘  as we want it to move nice and straight along a single direction.
--4  repeat count, how many times this tween is going to repeat itself. As we want it to repeat for as long as the game is active, we enter “-1“.
--5  reversing or not. We’re setting it to true as we want it to reverse.
--6  delay time, the platform’s going to wait 0.2 seconds before going back to the start.
local tween = tweenService:Create(part, tweenInfo, {Position = part.Position + Vector3.new(0, 20, 0)})
tween:Play()

Scroll to Top