I am making a old roblox game and i just made a car system simmilar to one from the 2008 era.
but even if i increase the torque of the HingeConstraint Motor it wont ride up the ramp.
Video : Watch New Bloxia 2009 - Roblox Studio 2025-08-18 23-58-43 | Streamable (0:09 seconds in the video)
I have tried increasing the torque or making the ramp more longer.
I can see the car hitting walls and getting stuck until you turn away, I’d imagine it’s the exact same issue. I believe this is caused by the control system not the actual motor? But I’m not exactly sure as I haven’t directly seen the scripts or anything.
Here’s the local script i used
local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local mouse = nil
local renderStepConn = nil
local inputBeganConn = nil
local inputEndedConn = nil
local ancestryConn = nil
local childAddedConn = nil
local rotationSpeed = math.rad(5760)
local car = nil
local steering = false
local function isValidCar(model)
return model:IsA("Model") and model:FindFirstChild("Engine") and model:FindFirstChild("ControlCar") and model.Name == "Car"
end
-- Updates the current car reference
local function updateCar(newCar)
if newCar and isValidCar(newCar) then
-- Disconnect old ancestry monitor
if ancestryConn then
ancestryConn:Disconnect()
ancestryConn = nil
end
car = newCar
--checks if car got removed
ancestryConn = car.AncestryChanged:Connect(function(_, newParent)
if not player.Character or not car:IsDescendantOf(player.Character) then
disableControls()
end
end)
end
end
local function startSteering()
if renderStepConn or not car then return end
local engine = car:FindFirstChild("Engine")
local remote = car:FindFirstChild("ControlCar")
if not engine or not remote then return end
renderStepConn = RunService.RenderStepped:Connect(function(dt)
remote:FireServer("Turn",mouse.Hit.Position)
end)
end
local function stopSteering()
if renderStepConn then
renderStepConn:Disconnect()
renderStepConn = nil
end
if car then
local remote = car:FindFirstChild("ControlCar")
if remote then
remote:FireServer("Turn", 0)
end
end
end
local function enableControls()
local character = player.Character
if not character then return end
for _, child in ipairs(character:GetChildren()) do
if isValidCar(child) then
updateCar(child)
break
end
end
childAddedConn = character.ChildAdded:Connect(function(child)
if isValidCar(child) then
updateCar(child)
end
end)
mouse = player:GetMouse()
inputBeganConn = UserInputService.InputBegan:Connect(function(input, processed)
if processed then return end
if not car then return end
local remote = car:FindFirstChild("ControlCar")
if not remote then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
steering = true
startSteering()
elseif input.KeyCode == Enum.KeyCode.Y then
remote:FireServer("Move", true)
elseif input.KeyCode == Enum.KeyCode.X then
remote:FireServer("Move", false)
elseif input.KeyCode == Enum.KeyCode.R then
remote:FireServer("Reverse", true)
end
end)
inputEndedConn = UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
steering = false
stopSteering()
end
end)
end
-- Disable car controls
function disableControls()
if renderStepConn then renderStepConn:Disconnect() renderStepConn = nil end
if inputBeganConn then inputBeganConn:Disconnect() inputBeganConn = nil end
if inputEndedConn then inputEndedConn:Disconnect() inputEndedConn = nil end
if ancestryConn then ancestryConn:Disconnect() ancestryConn = nil end
if childAddedConn then childAddedConn:Disconnect() childAddedConn = nil end
mouse = nil
car = nil
steering = false
end
tool.Equipped:Connect(enableControls)
tool.Unequipped:Connect(disableControls)
and here’s the script that the car uses to move :
local car = script.Parent
local engine = car:WaitForChild("Engine")
local turnForce = engine:WaitForChild("Turn")
local remote = car:WaitForChild("ControlCar")
local moving = false
remote.OnServerEvent:Connect(function(player, action, data)
print("Remote fired:", action, data)
if action == "Move" then
moving = data
if moving then
car.Part.Script.Enabled = true
car:WaitForChild("l1").HingeConstraint.AngularVelocity = 55
car:WaitForChild("l2").HingeConstraint.AngularVelocity = 55
car:WaitForChild("r1").HingeConstraint.AngularVelocity = -55
car:WaitForChild("r2").HingeConstraint.AngularVelocity = -55
else
car.Part.Script.Enabled = false
car:WaitForChild("l1").HingeConstraint.AngularVelocity = 0
car:WaitForChild("l2").HingeConstraint.AngularVelocity = 0
car:WaitForChild("r1").HingeConstraint.AngularVelocity = 0
car:WaitForChild("r2").HingeConstraint.AngularVelocity = 0
end
elseif action == "Turn" then
if moving then
local targetPos = data
local desiredCF = CFrame.lookAt(engine.Position, targetPos, Vector3.yAxis)
local gyro = engine:FindFirstChild("BodyGyro")
if gyro then
gyro.CFrame = desiredCF
end
else
end
end
end)
hope this helps!
also for clearance Engine is a part and turnForce is a BodyAngularVelocity.
this might not be the best code but it works on my end!
also i tried to recreate the 2008 feeling but the original tool doesnt work anymore..