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!
I want to have an basic Idle sound Plugin in the roblox Car system “A-Chassis”.
How I think it should be
When the Car is driving under 2 Km/h the idle sound slowly starts to play and the Stock sound gets slowly quiet. And if the car is over 2 Km/h, the Idle sound slowly stops playing and the Stock sound starts to play.
- What is the issue? Include screenshots / videos if possible!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, I searched many times for any others looking for an answer to that issue.
I also tried to do it myself but didn’t understand the “AC6_Stock_Sound” script.
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!
Basically, I don’t want the whole Plugin/Script for that but an explanation of the “AC6_Stock_Sound” script or little hints.
The “AC6_Stock_Sound” script.
--[[
___ _______ _
/ _ |____/ ___/ / ___ ____ ___ (_)__
/ __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
/_/ |_| \___/_//_/\_,_/___/___/_/___/
SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0
script:WaitForChild("Engine2")
if not FE then
for i,v in pairs(car.DriveSeat:GetChildren()) do
for _,a in pairs(script:GetChildren()) do
if v.Name==a.Name then v:Stop() wait() v:Destroy() end
end
end
for i,v in pairs(script:GetChildren()) do
v.Parent=car.DriveSeat.Motor
end
car.DriveSeat.Motor.Engine2:Play()
while wait() do
local _RPM = script.Parent.Values.RPM.Value
if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
car.DriveSeat.Motor.Engine2.Pitch = (car.DriveSeat.Motor.Engine2.SetPitch.Value + car.DriveSeat.Engine2.SetRev.Value*_RPM/_Tune.Redline)*on^2
end
else
local handler = car.AC6_FE_Sounds
handler:FireServer("newSound","Engine2",car.DriveSeat.Motor,script.Engine2.SoundId,0,script.Engine2.Volume,true)
handler:FireServer("playSound","Engine2")
local pitch=0
while wait() do
local _RPM = script.Parent.Values.RPM.Value
if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
pitch = (script.Engine2.SetPitch.Value + script.Engine2.SetRev.Value*_RPM/_Tune.Redline)*on^2
handler:FireServer("updateSound","Engine2",script.Engine2.SoundId,pitch,script.Engine2.Volume)
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.