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)