A continuación aparece una instantánea de la página web tal y como aparecía en 17/5/2024 (la última vez que nuestro rastreador la visitó). Esta es la versión de la página que se usó para la clasificación de los resultados de búsqueda. Puede que la página haya cambiado desde la última vez que la guardamos en caché. Para ver lo que puede haber cambiado (sin la información destacada), ve a la página actual.
Bing no se hace responsable del contenido de esta página.
(SOLVED) How do I make a script/thing so all sounds (even not specified) follow the speed of sound? - Scripting Support - Developer Forum | Roblox
Developer Forum | Roblox
I am not the best at scripting haha. and this is my first post on the dev forum, saw today that I am now able to reply and post!
So yeah, just seeing if it is possible!
if I had to guess, you used magnitude to determine how far the other players are from the initial shot, and played the sound accordingly with a delay
Try doing something like this:
local distance = (Shot_position - Player_position).Magnitude
wait(distance - BulletSpeedStudsPerSecond)
--sound volume logic could be similar to the wait function logic
You can’t ask dumb questions (if its intentional) remember that.
You could initially Store the player who is shooting’s position on a local script inside of their player Character (Starter character scripts). And then pass it to a server script through a remoteEvent. And vice versa: Fire back to all clients the location of the shot fired and perform logic through the specific handler for this event, in this case being a bullet fired from afar.
also my math is probably wrong on the wait function. You would probably want to divide the distance up into seconds by the bullet speed. So (if it works, that is lmao) instead of distance - bssp you would do
wait(distance / BulletSpeedStudsPerSecond) / 60
I dont know really how this would work. Give me a minute to find something