-- 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
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)
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
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
local seat = script.Parent.VehicleSeat keep these locals incase you wanna add more Press Read More on this comment to know local frontright = script.Parent.FrontRight local frontleft = script.Parent.FrontLeft local backright = script.Parent.BackRight local backleft = script.Parent.BackLeft local bodyangularvelocity = script.Parent.Base.AngularVelocity seat.Changed:Connect(function() if seat.Throttle == 1 then backleft.HingeConstraint.AngularVelocity = 150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = 150 backright.HingeConstraint.MotorMaxTorque = 15000 elseif seat.Throttle == -1 then backleft.HingeConstraint.AngularVelocity = -150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = -150 backright.HingeConstraint.MotorMaxTorque = 15000 elseif seat.Throttle == 0 then backleft.HingeConstraint.AngularVelocity = 0 backleft.HingeConstraint.MotorMaxTorque = 0 backright.HingeConstraint.AngularVelocity = 0 backright.HingeConstraint.MotorMaxTorque = 0
end if seat.Steer == 1 then bodyangularvelocity.MaxTorque = Vector3.new(0,100,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,-5,0) elseif seat.Steer == -1 then bodyangularvelocity.MaxTorque = Vector3.new(0,100,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,5,0) elseif seat.Steer == 0 then bodyangularvelocity.MaxTorque = Vector3.new(0,0,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,0,0) end end) >>>> local FrontLeft = script.parent.FrontLeft -- get ur wheel local (can be rear front left or right) in this line of code seat.Changed:Connect(function() if seat.Throttle == 1 then backleft.HingeConstraint.AngularVelocity = 150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = 150 backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like: elseif seat.Throttle == -1 then backleft.HingeConstraint.AngularVelocity = -150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = -150 backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like: elseif seat.Throttle == 0 then backleft.HingeConstraint.AngularVelocity = 0 backleft.HingeConstraint.MotorMaxTorque = 0 backright.HingeConstraint.AngularVelocity = 0 backright.HingeConstraint.MotorMaxTorque = 0 -- you add them here under this text like: ///////end FrontLeft.hingeconstraint.angularVelocity = then you just add the numbers that corresponds to like FrontLeft.HingeConstraint.AngularVelocity = (Number) and FrontLeft.HingeConstraint.MotorMaxTorque = (Number) and just enjoy ur customizable script
its a shame its only ond (one wheel drive) but the script to all rear drive: local seat = script.Parent.VehicleSeat -- keep these locals incase you wanna change Scroll down on this comment to know how to add mroe wheels local frontright = script.Parent.FrontRight local frontleft = script.Parent.FrontLeft local backright = script.Parent.BackRight local backleft = script.Parent.BackLeft local bodyangularvelocity = script.Parent.Base.AngularVelocity seat.Changed:Connect(function() if seat.Throttle == 1 then backleft.HingeConstraint.AngularVelocity = 150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = 150 backright.HingeConstraint.MotorMaxTorque = 15000 elseif seat.Throttle == -1 then backleft.HingeConstraint.AngularVelocity = -150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = -150 backright.HingeConstraint.MotorMaxTorque = 15000 elseif seat.Throttle == 0 then backleft.HingeConstraint.AngularVelocity = 0 backleft.HingeConstraint.MotorMaxTorque = 0 backright.HingeConstraint.AngularVelocity = 0 backright.HingeConstraint.MotorMaxTorque = 0
end if seat.Steer == 1 then bodyangularvelocity.MaxTorque = Vector3.new(0,100,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,-5,0) elseif seat.Steer == -1 then bodyangularvelocity.MaxTorque = Vector3.new(0,100,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,5,0) elseif seat.Steer == 0 then bodyangularvelocity.MaxTorque = Vector3.new(0,0,0) bodyangularvelocity.AngularVelocity = Vector3.new(0,0,0) end end) >>>> local FrontLeft = script.parent.FrontLeft -- get ur wheel local (can be rear front left or right) in this line of code seat.Changed:Connect(function() if seat.Throttle == 1 then backleft.HingeConstraint.AngularVelocity = 150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = 150 backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like: elseif seat.Throttle == -1 then backleft.HingeConstraint.AngularVelocity = -150 backleft.HingeConstraint.MotorMaxTorque = 15000 backright.HingeConstraint.AngularVelocity = -150 backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like: elseif seat.Throttle == 0 then backleft.HingeConstraint.AngularVelocity = 0 backleft.HingeConstraint.MotorMaxTorque = 0 backright.HingeConstraint.AngularVelocity = 0 backright.HingeConstraint.MotorMaxTorque = 0 -- you add them here under this text like: ///////end FrontLeft.hingeconstraint.angularVelocity = then you just add the numbers that corresponds to like FrontLeft.HingeConstraint.AngularVelocity = (Number) and FrontLeft.HingeConstraint.MotorMaxTorque = (Number) and just enjoy ur customizable script
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.
Wait.. I never got to find this video!
I'm lucky
-- 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)
hey so uh funny mistake u made the bottom script u spelt MaxTorque wrong.
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)
obama
obama
Osama bin Laden
Obama
Is the tutorial the same for 2024?
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)
I agree my car is messed up because it shakes every time i drive it because of the wheels and he doesnt make it clear what to do when this happens
not just you, I've been making games since 2019 and this tutorial sucks
Instructions unclear: the car isn't accelerating
Well you broke it!
@@ShadowFox-Studio dam
Thank you for the tutorial but there is one problem, I can't find the BodyAngularVelocity, how can I put it in?
Use angularvelocity instead because BodyAngularVelocity is deprecated
or u can do instance.new("BodyAngularVelocity,",workspace)
@@Gamer-jo5bx tank u
Finally one that’s new
Thanks!
ppyyyyyyyyyyyyyyyyyyyyyyuyuyuuyuyeyccoppinjs
\
.
.
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
You have to enable legacy items in Studio Settings or run instance.new("BodyAngularVelocity").Parent=workspace in the command bar
@@ShadowFox-Studio Where do you enable legacy items?
@@xhqown7098 studio settings
@@xhqown7098 in studio settings > Studio, scroll to browsing, then enable "Depreciated Objects Shown"
@@ShadowFox-Studio this still wont work
hey! can you help me? i did a car with your angular velocity and linearvelocity ideas but i have a issue, the car shakes because the wheels movements
Did you set the wheel settings right?
@@ShadowFox-Studio What are the wheel settings
One of them is a motor and the other 3 are hinges
How can I make like a key like that you can only sit on the seat when you have that key
Yes am do later
You just got a sub
Thanks!
@@ShadowFox-Studio will you remember me when you get famous I am your 3rd sub
@@Gr33nSc0ut How the heck is the guy supposed to remember you if i cant remember my dinner?!
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?
Try setting both of the back wheels as motors
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
You'll have to add another motor that turns the wheels in the direction you want to turn.
local seat = script.Parent.VehicleSeat keep these locals incase you wanna add more Press Read More on this comment to know
local frontright = script.Parent.FrontRight
local frontleft = script.Parent.FrontLeft
local backright = script.Parent.BackRight
local backleft = script.Parent.BackLeft
local bodyangularvelocity = script.Parent.Base.AngularVelocity
seat.Changed:Connect(function()
if seat.Throttle == 1 then
backleft.HingeConstraint.AngularVelocity = 150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = 150
backright.HingeConstraint.MotorMaxTorque = 15000
elseif seat.Throttle == -1 then
backleft.HingeConstraint.AngularVelocity = -150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = -150
backright.HingeConstraint.MotorMaxTorque = 15000
elseif seat.Throttle == 0 then
backleft.HingeConstraint.AngularVelocity = 0
backleft.HingeConstraint.MotorMaxTorque = 0
backright.HingeConstraint.AngularVelocity = 0
backright.HingeConstraint.MotorMaxTorque = 0
end
if seat.Steer == 1 then
bodyangularvelocity.MaxTorque = Vector3.new(0,100,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,-5,0)
elseif seat.Steer == -1 then
bodyangularvelocity.MaxTorque = Vector3.new(0,100,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,5,0)
elseif seat.Steer == 0 then
bodyangularvelocity.MaxTorque = Vector3.new(0,0,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,0,0)
end
end)
>>>>
local FrontLeft = script.parent.FrontLeft -- get ur wheel local (can be rear front left or right)
in this line of code
seat.Changed:Connect(function()
if seat.Throttle == 1 then
backleft.HingeConstraint.AngularVelocity = 150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = 150
backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like:
elseif seat.Throttle == -1 then
backleft.HingeConstraint.AngularVelocity = -150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = -150
backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like:
elseif seat.Throttle == 0 then
backleft.HingeConstraint.AngularVelocity = 0
backleft.HingeConstraint.MotorMaxTorque = 0
backright.HingeConstraint.AngularVelocity = 0
backright.HingeConstraint.MotorMaxTorque = 0 -- you add them here under this text like:
///////end
FrontLeft.hingeconstraint.angularVelocity = then you just add the numbers that corresponds to like
FrontLeft.HingeConstraint.AngularVelocity = (Number)
and
FrontLeft.HingeConstraint.MotorMaxTorque = (Number)
and just enjoy
ur customizable script
i made a car only by vectorforce and angular velocity this is very simple
I made a car similar to that one too. I used BodyAngularVelocity and BodyVelocity.
@@ShadowFox-Studio yes
bro how do you select 2 things at once
Press shift + left click
@@ZentaMark anks
Can you make it a model?
What do you mean?
@@ShadowFox-Studio He means to make it a model so that we can download the exact car you made and use it in our game
@@realeliasyoutube sure! I just need to find where I put the file for it
New sub
Thanks
It does not work somehow
@@Not_ThatKidYT What happened?
The car script did nit work
4:00
when I go forward it turns
I think you scripted it wrong
hey I need help
you should add the script in the description or comments
look
i dont have bodyangleerveloassity
Enable "Show Depreciated Objects" in studio settings
sydney trains game purpose be like
@@AQUA69. I love Sydney train games
i think angular velocity works for me
its a shame its only ond (one wheel drive) but the script to all rear drive:
local seat = script.Parent.VehicleSeat -- keep these locals incase you wanna change Scroll down on this comment to know how to add mroe wheels
local frontright = script.Parent.FrontRight
local frontleft = script.Parent.FrontLeft
local backright = script.Parent.BackRight
local backleft = script.Parent.BackLeft
local bodyangularvelocity = script.Parent.Base.AngularVelocity
seat.Changed:Connect(function()
if seat.Throttle == 1 then
backleft.HingeConstraint.AngularVelocity = 150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = 150
backright.HingeConstraint.MotorMaxTorque = 15000
elseif seat.Throttle == -1 then
backleft.HingeConstraint.AngularVelocity = -150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = -150
backright.HingeConstraint.MotorMaxTorque = 15000
elseif seat.Throttle == 0 then
backleft.HingeConstraint.AngularVelocity = 0
backleft.HingeConstraint.MotorMaxTorque = 0
backright.HingeConstraint.AngularVelocity = 0
backright.HingeConstraint.MotorMaxTorque = 0
end
if seat.Steer == 1 then
bodyangularvelocity.MaxTorque = Vector3.new(0,100,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,-5,0)
elseif seat.Steer == -1 then
bodyangularvelocity.MaxTorque = Vector3.new(0,100,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,5,0)
elseif seat.Steer == 0 then
bodyangularvelocity.MaxTorque = Vector3.new(0,0,0)
bodyangularvelocity.AngularVelocity = Vector3.new(0,0,0)
end
end)
>>>>
local FrontLeft = script.parent.FrontLeft -- get ur wheel local (can be rear front left or right)
in this line of code
seat.Changed:Connect(function()
if seat.Throttle == 1 then
backleft.HingeConstraint.AngularVelocity = 150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = 150
backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like:
elseif seat.Throttle == -1 then
backleft.HingeConstraint.AngularVelocity = -150
backleft.HingeConstraint.MotorMaxTorque = 15000
backright.HingeConstraint.AngularVelocity = -150
backright.HingeConstraint.MotorMaxTorque = 15000 -- you add them here under this text like:
elseif seat.Throttle == 0 then
backleft.HingeConstraint.AngularVelocity = 0
backleft.HingeConstraint.MotorMaxTorque = 0
backright.HingeConstraint.AngularVelocity = 0
backright.HingeConstraint.MotorMaxTorque = 0 -- you add them here under this text like:
///////end
FrontLeft.hingeconstraint.angularVelocity = then you just add the numbers that corresponds to like
FrontLeft.HingeConstraint.AngularVelocity = (Number)
and
FrontLeft.HingeConstraint.MotorMaxTorque = (Number)
and just enjoy
ur customizable script
inju daulhook
I don’t think a script is a “Simple car”
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
You can't make a car without a script
I want to learn how to use lua but it’s so confusing to me
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.
@@oberonpanopticon It's actually harder in older versions of roblox due to the fewer amount of tools