Choppy UI Tween

Hello fellow devs, just having a current issue with tweening and my current UI. i feel as if its choppy, and not cosnistent in a sense when im tweening said frame.
`

	            local cdFrame = slot:WaitForChild("CooldownDisplay")

			
				local TweenService = game:GetService("TweenService")

				
				cdFrame.Visible = true
				
				cdFrame.Size = UDim2.new(1,0,1,0)

				local tweenInfo = TweenInfo.new(
					cooldownTime,
					Enum.EasingStyle.Linear,
					Enum.EasingDirection.Out
				)

				-- Shrink downwards smoothly
				local tween = TweenService:Create(cdFrame, tweenInfo, {
					Size = UDim2.new(1,0,0,0),  
					Position = UDim2.new(0,0,1,0),   
				})

				tween:Play()

				tween.Completed:Connect(function()
					cdFrame.Visible = false
					cdFrame.AnchorPoint = Vector2.new(0,0)
					cdFrame.Position = UDim2.new(0,0,0,0)
					cdFrame.Size = UDim2.new(1,0,1,0)
					cdFrame.Finished:Play()
				end)

`

The only way I could see this happening is if you were tweening it from the server.

its actually done locally, which is why im so confused

I feel like it’s because it’s a small frame. Try scaling it up and seeing if it’s still choppy.

1 Like

the more time it takes to tween, the less float precision you are seeing

1 Like

Yeah I’m not really sure. Perhaps the resolution is too small and therefore it looks choppy. You could try testing outside of studio on a full monitor resolution and see if the issue persists.

1 Like

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