local model = script.Parent
local root = model:WaitForChild("Root")
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, --Time it takes to complete
Enum.EasingStyle.Sine, -- Style to tween
Enum.EasingDirection.In, --In is default, out is reverse, inOut is in first then out
-1, -- Times to repeat (-1 is infinite)
true, --Does it repeat?
1 --Time between tweens (if it repeats)
)
local properties = { --Put as many properties as you want
Position = Vector3.new(0, 10, 0)
--(only properties that should be used are Position, Orientation, and CFrame, since we are tweening the Root)
}
local tween = tweenService:Create(root, tweenInfo, properties)
tween:Play()
If it’s not a single object and rather a model, you can use the PrimaryPart property of the model. If it’s for a player’s character, I wouldn’t recommend that has the movement isn’t smooth at all.
I think this thread can help with what you need. It has a full in-depth guide on tweening models, so a full read through of it could be really helpful for you.