Help with a Wheel of Fortune-esque mechanic

  1. What do you want to achieve? Keep it simple and clear!
    I am attempting to make a game that is heavily based around a central cylinder in the map, with an arrow pointing out of it. Around this cylinder, there are any amount of platforms, as players can join/leave or die throughout the game. I want to be able to spin this arrow around a random amount of times until it reaches a pre-determined platform, where it will stop. Almost the opposite of how a wheel of fortune wheel would work. The arrow is a model made up of a few parts, with a primary part in the center of map, anchoring its rotation to it.

  2. What is the issue? Include screenshots / videos if possible!

I am having issues with actually getting this to work, especially with the additional spinning before it acutally goes to the specified platform. With many solutions I have tried, I have found either I have made the arrow spin around, made the arrow spin just to the platform specified, or the combination of the two, but due to TweenService, it makes it so that it:

  • does an amount of rotations (ex. 2 * 360)
  • then, slowly, turns the other way and turns toward the platform.
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried many solutions, without luck. I first tried just using CFrame.lookAt(arrow, platform), but it didn’t work as well as I planned. I currently create a direction by doing (arrow - platform).Unit and add it to CFrame.lookAt(arrow + Direction, arrow), which does work, but just to look at that platform. So far, I have only used TweenService to move the arrow, using weld-constraints in order to move the arrow, which isn’t too terrible, but as mentioned previously, is limited as the purpose of tweening is to find the shortest path, which isn’t always the correct one.

Essentially, I’m at a roadblock, and not sure where to go next. Any help would be appreciated. If you need more information from me, I will try to check this post periodically to answer any questions.

tldr; want to make an arrow that revolves around a central cylinder to choose a platform around it and roulette spin towards it; got stuck doing so.

1 Like

I would look into writing a few lerp functions for this. One for spinning and one for getting out of the spin. This website has some useful formulas: solhsa.com - tutorials