How would I create a 'hovering' up and down effect for a Part?

I have a Part with a SurfaceGui that’s supposed to be a screen displaying match stats, however I’d like to create an effect for it to appear as if it’s hovering up and down very slightly, since it’s floating in midair.

I’d appreciate any suggestions or examples on how I could do this, as I tried it with TweenService and it didn’t work out too well.

3 Likes

A similar question was recently asked. Do these answers help answer your question?

In my game I made something similar like @Wunder_Wulfe suggested:

2 Likes

Have you tried different tweening styles like quad or quint? These look better for sliding into position as they slow down at the end

1 Like

I haven’t, I’ll try them out. Thanks to both of you for the help.

Do something like this:

local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(--[[time it takes to complete a bob]], Enum.EasingStyle.Quart/Quint`, Enum.EasingDirection.Out, --[[repeat count]], --reverses - true/false]], --[[delay for each repeat]])
local bob = TweenService:Create(--[[part to bob]], tweenInfo, --[[new position for the part]])
bob:Play()
1 Like