-- I set both my front wheels as motors, no idea how the steer function works but everything else should work fine -- tells the script that these parts exist local Seat = script.Parent.VehicleSeat local FrontRight = script.Parent.FrontRight local FrontLeft = script.Parent.FrontLeft local BackLeft = script.Parent.BackLeft local BackRight = script.Parent.BackRight local BodyAngularVelocity = script.Parent.Base.BodyAngularVelocity Seat.Changed:Connect(function() --function is telling when this is called execute this if Seat.Throttle == 1 then -- changes throttle appon a key press meaning if it is = to one it will execute this code FrontLeft.HingeConstraint.AngularVelocity = 25 -- tells vehicle to accelerate at specifed speed FrontLeft.HingeConstraint.MotorMaxTorque = 10000 -- force of rotation FrontRight.HingeConstraint.AngularVelocity = -25 FrontRight.HingeConstraint.MotorMaxTorque = 10000 elseif Seat.Throttle == -1 then FrontLeft.HingeConstraint.AngularVelocity = -25 FrontLeft.HingeConstraint.MotorMaxTorque = 10000 FrontRight.HingeConstraint.AngularVelocity = 25 FrontRight.HingeConstraint.MotorMaxTorque = 10000 elseif Seat.Throttle == 0 then FrontLeft.HingeConstraint.AngularVelocity = 0 FrontLeft.HingeConstraint.MotorMaxTorque = 0 FrontRight.HingeConstraint.AngularVelocity = 0 FrontRight.HingeConstraint.MotorMaxTorque = 0 end -- bottom code never worked for me but the rest should be OK if Seat.Steer == 1 then BodyAngularVelocity.MaxTorue = Vector3.new(0,10000,0) BodyAngularVelocity.AngularVelocity = Vector3.new(0,-5,0) elseif Seat.Steer == -1 then BodyAngularVelocity.MaxTorue = Vector3.new(0,10000,0) BodyAngularVelocity.AngularVelocity = Vector3.new(0,5,0) elseif Seat.Steer == 0 then BodyAngularVelocity.MaxTorue = Vector3.new(0,10000,0) BodyAngularVelocity.AngularVelocity = Vector3.new(0,0,0) end end)
local Seat = script.Parent.VehicleSeat local FrontRight = script.Parent.FrontRight local FrontLeft = script.Parent.FrontLeft local BackLeft = script.Parent.BackLeft local BackRight = script.Parent.BackRight local BodyAngularVelocity = script.Parent.Base.BodyAngularVelocity Seat.Changed:Connect(function() if Seat.Throttle == 1 then elseif Seat.Throttle == -1 then elseif Seat.Throttle == 0 then end if Seat.Steer == 1 then elseif Seat.Steer == -1 then elseif Seat.Steer == 0 then end end)
when i set the BackLeft wheel to act as a motor, it kinda destabilizes the whole vehicle since its big and makes it almost impossible to make curves. how can i fix that?
you can set the motorAcceleration to lower like 100 BackLeft.HingeConstraint.MotorMaxAcceleration = 100 and also add the second wheel as motor and make it work
I tried to follow along with this tutorial but I find it’s really lacking in detail. You explain barely any of what you’re doing, especially with the scripting (which I’d imagine is the most important part). Maybe this tutorial just isn’t for absolute beginners, and it’s probably hard to go into detail when you only have on-screen text to explain with, but regardless it seems kinda like a “teach a man to fish” type of scenario. (Show a man what to do to make a Roblox car and he’ll have a Roblox car, tell a man how and why a Roblox car works and he’ll be set for life)
if you want to make a roblox game 100% you need to know how to script, dont expect anything if you dont inow nothing about lua or scripting Btw that script uses too basic functions of scripting that are very easy so thats why its simple
unfortunately it doesn’t seem like it gets any simpler. It seems like it might have actually been easier in older versions of Roblox, but I’d need to do more research to be sure.
I dont see the body angular velocity option how do you get that? (edit:) I tried using just the normal angular velocity and it didnt work, I tried not editing the code you have at all and changing the bodyangular velocities to angular velocity and it still didnt work