How to make a image shake like a ring bell

Hey Developers!

So I am building a update log and I want to make a imagebutton shake like a ring bell to grab the player’s attention and let the player know about a new update. Any ideas or tutorials I can see?

Please let me know.

Sincerely,

Papahetan

1 Like

Create a tween on rotation like 15, then once it is completed do another tween that has a rotation of -15 and once that is done play the first tween again then that will create an infinite loop of the bell to stop it just cancel the first tween.

1 Like
local player = game.Players.LocalPlayer

local TweenService = game:GetService("TweenService")

local image = your image here
image.Rotation = 0
image.Visible = true

-- triggers when the player hover their mouse over the image for ex--
local YourGUI = player.PlayerGui:WaitForChild("HUD")	
	if YourGUI then	
	local tweenInfo = TweenInfo.new(
		0.1, -- Time
		Enum.EasingStyle.Bounce, -- EasingStyle, mess around with this for different style also read the description for each style
		Enum.EasingDirection.Out, -- EasingDirection
		0, -- RepeatCount (when less than zero the tween will loop indefinitely)
		false, -- Reverses (tween will reverse once reaching it's goal)
		0 -- DelayTime
	)

	local tween = TweenService:Create(image, tweenInfo, {Rotation = math.random(-5, 5)}) -- messing around with these values


	tween:Play()
	end
end)
--I suggest you go Roblox Dev Guide and do more research about tween service and btw put this in the local script
1 Like