So I figured it out thanks to personal_ly for helping me!
If you want to add nitrous to your car, then find your A-Chassis script, open it, scroll down
TO THE BOTTOM and find the end of this script:
ToggleTCS = Enum.KeyCode.T ,
ToggleABS = Enum.KeyCode.Y ,
ToggleTransMode = Enum.KeyCode.M ,
ToggleMouseDrive = Enum.KeyCode.R ,
Throttle = Enum.KeyCode.Up ,
Brake = Enum.KeyCode.Down ,
SteerLeft = Enum.KeyCode.Left ,
SteerRight = Enum.KeyCode.Right ,
Throttle2 = Enum.KeyCode.W ,
Brake2 = Enum.KeyCode.S ,
SteerLeft2 = Enum.KeyCode.A ,
SteerRight2 = Enum.KeyCode.D ,
ShiftUp = Enum.KeyCode.E ,
ShiftDown = Enum.KeyCode.Q ,
Clutch = Enum.KeyCode.P ,
PBrake = Enum.KeyCode.LeftShift ,
MouseThrottle = Enum.UserInputType.MouseButton1 ,
MouseBrake = Enum.UserInputType.MouseButton2 ,
MouseClutch = Enum.KeyCode.W ,
MouseShiftUp = Enum.KeyCode.E ,
MouseShiftDown = Enum.KeyCode.Q ,
MousePBrake = Enum.KeyCode.LeftShift ,
ContlrThrottle = Enum.KeyCode.ButtonR2 ,
ContlrBrake = Enum.KeyCode.ButtonL2 ,
ContlrSteer = Enum.KeyCode.Thumbstick1 ,
ContlrShiftUp = Enum.KeyCode.ButtonY ,
ContlrShiftDown = Enum.KeyCode.ButtonX ,
ContlrClutch = Enum.KeyCode.ButtonR1 ,
ContlrPBrake = Enum.KeyCode.ButtonL1 ,
ContlrToggleTMode = Enum.KeyCode.DPadUp ,
ContlrToggleTCS = Enum.KeyCode.DPadDown ,
ContlrToggleABS = Enum.KeyCode.DPadRight ,
}
When you find the end of that, change it to this:
ToggleTCS = Enum.KeyCode.T ,
ToggleABS = Enum.KeyCode.Y ,
ToggleTransMode = Enum.KeyCode.M ,
ToggleMouseDrive = Enum.KeyCode.R ,
Throttle = Enum.KeyCode.Up ,
Brake = Enum.KeyCode.Down ,
SteerLeft = Enum.KeyCode.Left ,
SteerRight = Enum.KeyCode.Right ,
Throttle2 = Enum.KeyCode.W ,
Brake2 = Enum.KeyCode.S ,
SteerLeft2 = Enum.KeyCode.A ,
SteerRight2 = Enum.KeyCode.D ,
ShiftUp = Enum.KeyCode.E ,
ShiftDown = Enum.KeyCode.Q ,
Clutch = Enum.KeyCode.P ,
PBrake = Enum.KeyCode.LeftShift ,
MouseThrottle = Enum.UserInputType.MouseButton1 ,
MouseBrake = Enum.UserInputType.MouseButton2 ,
MouseClutch = Enum.KeyCode.W ,
MouseShiftUp = Enum.KeyCode.E ,
MouseShiftDown = Enum.KeyCode.Q ,
MousePBrake = Enum.KeyCode.LeftShift ,
ContlrThrottle = Enum.KeyCode.ButtonR2 ,
ContlrBrake = Enum.KeyCode.ButtonL2 ,
ContlrSteer = Enum.KeyCode.Thumbstick1 ,
ContlrShiftUp = Enum.KeyCode.ButtonY ,
ContlrShiftDown = Enum.KeyCode.ButtonX ,
ContlrClutch = Enum.KeyCode.ButtonR1 ,
ContlrPBrake = Enum.KeyCode.ButtonL1 ,
ContlrToggleTMode = Enum.KeyCode.DPadUp ,
ContlrToggleTCS = Enum.KeyCode.DPadDown ,
ContlrToggleABS = Enum.KeyCode.DPadRight ,
}
local Cooldown = false
local Using = false
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:connect(function(input,gameProcessed)
if not gameProcessed then
if input.KeyCode == Enum.KeyCode.N and Cooldown == false and Using == false then
Using = true
print("Player pressed N")
Tune.Horsepower = 1000
delay(5,function()
Tune.Horsepower = 400
Cooldown = true
Using = false
spawn(function()
wait(1)
Cooldown = false
end)
end)
end
end
end)
Nitrous should work with the N key!
1 comment
A chassis hp is a script value, not a physical object. It's like HP = 350. Try adding a int value in a-Chassis script and in the hp line in a chassis just put HP = script.HP.Value.