I’m trying to make a car flip system that when I press V it flips up using bodygyro but it doesn’t work
the script:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.V then
script.Parent.BodyGyro.CFrame = script.Parent.CFrame
while script.Parent.Disabled == false do
wait(1)
if script.Parent.CFrame.upVector.Y < 0.2 then
wait(1)
if script.Parent.CFrame.upVector.Y < 0.2 then
script.Parent.BodyGyro.MaxTorque = Vector3.new(1000,0,1000)
end
end
if script.Parent.CFrame.upVector.Y >= 0.2 then
script.Parent.BodyGyro.MaxTorque = Vector3.new(0,0,0)
end
end
end
end)