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 already achieved brakes for my airplane, but there’s a problem. The bodyvelocity will get back to normal once reduced.
- What is the issue? Include screenshots / videos if possible!
(sorry for bad quality)
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
- Yeah, nothing helped sadly.
Here’s the server-side code for the brakes. The airplane already has a bodyvelocity inside of the engine.
script.Parent.Parent.Events:WaitForChild("Brakes").OnServerEvent:Connect(function(client, state)
local BodyForce = script.Parent.Parent:WaitForChild("MainParts"):WaitForChild("Engine"):FindFirstChild("BodyVelocity")
BodyForce.Velocity = BodyForce.Velocity - script.Parent.Parent.MainParts.Engine.CFrame.LookVector * 1
end)
I want to make it so once you brake, it stays at the reduced speed and doesn’t get back to normal.