So this script measures the pitch for the boats engine, and water sounds with the speed of the boat. Now this script doesn't work, and it the audio somewhat lags in-game even though it runs smoothly.
The script for it:
local Engine = script.Parent.Engine local WaterEffects = script.Parent.WaterSounds while true do speed = math.floor(math.sqrt((Engine.Velocity.x^2)+(Engine.Velocity.y^2)+(Engine.Velocity.z^2))) Engine.EngineSounds.Pitch = (speed/150)+0.300 WaterEffects.Water.Pitch = (speed/150)+0.500 WaterEffects.Water.Volume = Engine.Velocity.Magnitude/170 wait() end
Should I be using remote events, or anything like it with replicated storage?