Clicker effect on click

I’m wanting a click effect, so when I click, 8 lines comes from the mouse and kinda tween outwards, before disappearing.
image

for i = 1, 8 do
		local Rotation = (360 / 8) * i
		local Line = script.Line:Clone()
		
		Line.Parent = self.HUD.ClickerContents
		print(Rotation)
	end

This is about the extent of progress :rofl: But I’m unsure how to move them to the specific position, or how to angle the frame

2 Likes

Well they are all facing to a direction so IF the arrows are all singles one like not one frame with all the arrow image you could just tween them into the direction they’re facing to. And then change its transparency or anything else you like.

https://gyazo.com/baa9de545ec080b8c8212b24717bec83

Something like this?

local tweens = game:GetService("TweenService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()

local clickFrame = script:WaitForChild("ClickFrame")

local screenGui = script.Parent

local _tweens = table.create(8)
local debounce = false

local function onClick()
	if debounce then return end
	debounce = true
	local clickFrameClone = clickFrame:Clone()
	clickFrameClone.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
	clickFrameClone.Parent = screenGui
	table.insert(_tweens, tweens:Create(clickFrameClone.Down, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.5, 0, 0.8, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.DownLeft, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.2, 0, 0.8, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.DownRight, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.8, 0, 0.8, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.Left, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.2, 0, 0.5, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.Right, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.8, 0, 0.5, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.Up, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.5, 0, 0.2, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.UpLeft, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.2, 0, 0.2, 0)}))
	table.insert(_tweens, tweens:Create(clickFrameClone.UpRight, TweenInfo.new(0.5, Enum.EasingStyle.Linear), {Position = UDim2.new(0.8, 0, 0.2, 0)}))
	for _, tween in ipairs(_tweens) do
		tween:Play()
	end
	table.clear(_tweens)
	task.wait(0.5)
	clickFrameClone:Destroy()
	debounce = false
end

mouse.Button1Down:Connect(onClick)

You’re welcome to finetune it to your desires.

test.rbxl (31.2 KB)