PlaybackSpeed as Mouse.Y being too high

So im trying to make a sound’s PlaybackSpeed be based on how high/low the player’s mouse is (on the screen)
Like this, except the higher your mouse is, the higher the playback speed is (Item Asylum):


So i know how to make the client tell the server what their Mouse.Y is, but i dont know how to shorten the number/make it specific, as of now, if its too low, the mouse.Y is like 500 or something, if its really high, its like -30, Im not sure how to do this

since your issue is with high values, try dividing until you reach the desired average. for example, if the result from Mouse.Y ranges from 0 to 500, and i want PlaybackSpeed to be between 0 and 2, Iiuse the following code:

Mouse.Y = 343

Sound.PlaybackSpeed = Mouse.Y/250

print(Sound.PlaybackSpeed)

Output: 1.372

not sure if this is what you wanted, so if you have any questions, feel free to ask, sorry for the incomplete post, accidentally pressed enter lol

1 Like

Thanks! I tried with mouse.Y/2 to half it, Didnt think of making the number higher.

I was a bit confused when reading it until you edited it lol, No worries!

1 Like

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