Click effect on ui

How would i achieve something like this:
(with the +1 and the bubble on it)

TweenService for number “+1” and for bubble. We can’t use visible border with UICorner so they created their circle themselves.
For calling function, you can use any of these:
GUI.MouseButton1Down or GUI.MouseButton1Up or GUI.MouseClicked(Both)
Also, they used custom cursor icon, which size they changing after clicking

You can mess around with the rotation value, tween values, etc

local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local function PlayTween()
	local MouseLocation = UserInputService:GetMouseLocation()
	local TextLabel = Template:Clone()
	TextLabel.Size = UDim2.new(0, 0, 0, 0)
	TextLabel.TextScaled = true
	TextLabel.Position = UDim2.fromOffset(MouseLocation.X, MouseLocation.Y)
	TextLabel.Rotation = math.random(-15, 15)
	
	local Tweens = {
		TransparencyTween = TweenService:Create(
			TextLabel,
			TweenInfo.new(1, Enum.EasingStyle.Linear),
			{TextTransparency = 1}
		),

		SizeTween = TweenService:Create(
			TextLabel,
			TweenInfo.new(1)
			{Size = UDim2.fromOffset(100, 50)}
		),

		PositionTween = TweenService:Create(
			TextLabel,
			TweenInfo.new(1),
			{Position = UDim2.fromOffset(MouseLocation.X, MouseLocation.Y + 100)}
		)
	}
	
	for _, Tween in pairs(Tweens) do
		Tween:Play()
	end
end

PlayTween() -- Call this whenever the player clicks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.