well, you aren't wrong I am definitely not experienced but I need this for school, I do not care if it's on time with the music just wanted an idea on how to get the points added when pressed at a certain time.
Whoops I accidentally reloaded and lost everything I wrote, so here's a shorter version of what I wrote
Sound Arrows are notes that you need to hit
Click Arrows are where you need to hit
They are both objects.
The Sounds are placed in the room as objects, and they move into the Clicks.
The Clicks have a button they listen to. When the button is clicked, the Clicks check to see if a Sound is overlapping it. If it is, delete the Sound and give some points. If not, it was a miss.
If you want to keep the game in time with the music, I came up with 2 solutions that might or might not work
The first one is the easiest. Delta time.
Here is a video explaining and showing how to implement it.
The second one is more complicated.
The Sounds do a calculation to see where in the song they would be clicked on. The Y position of the Clicks would be the 0 of the song. Then when they need to move, they check to see where they would be based on how much song has progressed.
Here is a function that would help with that.
Alternatively, you would move the Clicks instead of the Sounds, and have the camera follow them. That might be more efficient actually.