Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Circular Tween just teleports frame?

Trying to make an effect for my game when you collect money, but whenever I try to use the circular tween, it just teleports the frame. Heres the code I'm trying to use:

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 100, 0, 150), Enum.EasingDirection.Out, Enum.EasingStyle.Circular, 1, true)
	wait(1)
	script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 100, 0, 400), Enum.EasingDirection.In, Enum.EasingStyle.Circular, 1, true)
end)

Heres the result of this: Here

2 comments

0

I think the time may be too fast? set it to 2 or something higher so it has time.

0

Nope, still the same result

1 answer

Maybe try using tweenService?

script.Parent.MouseButton1Click:Connect(function()
local frame = script.Parent.Parent.Frame
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.Out,0,false,0)

tweenService:Create(frame,tweenInfo,{Position = UDim2.new(0, 100, 0, 150)}):Play()

    wait(1)

tweenInfo = TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.In,0,false,0)

tweenService:Create(frame,tweenInfo,{Position = UDim2.new(0, 100, 0, 400)}):Play()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.