Hi, so I'm trying to get this engine spool script to work, but all it does is print "debug1", and not go past the "if script.Parent.Throttle.Value > 0.01 then" line of code. I've made sure the throttle value is working, and it is. The "script.Parent.Normal.Pitch" audio is activated by another script, so that's not the issue either. It doesn't print "debug2". The "--Server" and "--Local" scripts are two separate scripts.
```lua --Local local ReplicatedStorage = game:GetService("ReplicatedStorage") local engineSpool = ReplicatedStorage:WaitForChild("EngineSpool")
while wait(0.03) do if script.Parent.Throttle.Value > 0.01 then print("Spool Started") engineSpool:FireServer() end end
--Server local ReplicatedStorage = game:GetService("ReplicatedStorage") local engineSpool = Instance.new("RemoteEvent", ReplicatedStorage) engineSpool.Name = "EngineSpool"
local function onEngineSpool() print("debug1") if script.Parent.Throttle.Value > 0.01 then print("debug2") script.Parent.Normal.Pitch = script.Parent.BasePitch.Value + (script.Parent.MaxPitch.Value-script.Parent.BasePitch.Value)*script.Parent.Throttle.Value else script.Parent.Normal.Pitch = script.Parent.BasePitch.Value end if script.Parent.Throttle.Value > 0.8 then script.Parent.Buzzsaw:Play() else script.Parent.Buzzsaw:Stop() end end engineSpool.OnServerEvent:Connect(onEngineSpool)