You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
Make it so each vehicle in the game can make road sounds if you drive on the road or highway.
For example: I drive a car, then it’ll make the pavement or road sound like realistic or real life based on the roads and highways.
-
What is the issue? Include screenshots / videos if possible!
I can’t seem to script it at all, because I’m clueless at this point. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Tried youtube, but barely any good tutorials.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I even tried doing what UD Westover would do, but can’t really find a solution so I deleted it all.
I’ve tried:
local Core = Vehicle.Core
local PavementSounds = Core:FindFirstChild("FirstPerson")
local TireEffects = {}
local SoundGroup = Instance.new("SoundGroup")
SoundGroup.Volume = 1
SoundGroup.Parent = game:GetService("SoundService")
for _, SoundFolder in pairs(game.ReplicatedStorage.GameSettings.Assets.PavementSounds:GetChildren()) do
if tonumber(SoundFolder.Name) and SoundFolder:FindFirstChild("Colors") and SoundFolder:FindFirstChild("Material") then
local Sound = Instance.new("Sound")
Sound.SoundId = "rbxassetid://"..SoundFolder.Name
SoundFolder.Colors:Clone().Parent = Sound
SoundFolder.Material:Clone().Parent = Sound
Sound.Volume = 1
Sound.SoundGroup = SoundGroup
Sound.Looped = true
Sound.Parent = Core.FirstPerson
table.insert(TireEffects, Sound)
end
end
Vehicles[Vehicle] = {SoundGroup, TireEffects}
Vehicle.AncestryChanged:Connect(function(Child, Parent)
if not Vehicle.Parent then
Vehicles[Child][1]:Destroy()
Vehicles[Child] = nil
for _, Function in pairs(Functions) do Function:Disconnect() end
end
end)
But I know it wouldn’t work.
I believe I’m posting in the wrong topic, but I’d like to hear your feedback and help and all that.
If you could help me further more onto this, please contact me via discord: 49dec#6526