How do I make a Ui wheel spinner

Hello Developers!

I was recently trying to create a spin the wheel to earn something kind of game, and I ran into a big problem. I don’t know how to create a spinner! I’ve looked almost everywhere online, but I was unable to find a spinner that matched all of these attributes:

  1. Was Free
  2. Good Quality
  3. Ui based, not Physical

How do I create a spinner?

(I may have found a solution, currently working on it)

Any Help is Appreciated,
OceanTubez

1 Like

It’s pretty simple.

  1. Generate a random number between 1 and the number of items.

  2. Tween the spinner’s rotation to the angle based on that position by doing

local function calculateDegree(itemAngle) --Item is the angle of the item this can be anything it just depends on the size of the UI on the wheel.
	return math.min(1+speed*(360 / totalItems), 360)
end
  1. Tween the rotation a couple times and after the first few 360 degrees tween it to the final random item.
1 Like

I’ve previously posted code for one I made a while ago which may help you, here’s the original post:

Thanks for the help, but I did figure it a solution similar to yours!

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