How can i create a VERY basic car? I’ve read all the posts and they make me want to rip my hair out. why is it so complicated. i dont need any weird mechanics or anything, i just need a car that you can get in and drive.
- Hinge constraints. (set actuatortypes and stuff)
- Script: (this is a base, you have to modify it)
local wheel = -- direct it to the motor hinges
local steer = -- direct it to the servo hinges
local speed = 80 -- top speed
script.Parent.Changed:Connect(function(property)
wheel.AngularVelocity = speed * script.Parent.Throttle -- negative the input if its turning the wrong direction
steer.TargetAngle = 30 * script.Parent.Steer -- in degrees
end)
or just find a chassis that uses the deprecated hingesurface method
Does it need suspension?
@grimmerschool2 those are very basic suggestions that don’t really help for someone who doesn’t know what’s going on with scripting or how to set up the HingeConstraints.
There used to be a really great YouTube tutorial that Roblox put out. It walked you through the placement of Parts, Constraints, and Attachments.
It also gave you the scripts and recommendations about how to set it up.
Unfortunately they took down the video.
What are the issues you are having understanding cars? I’ve built and played around with probably a hundred cars and vehicles, so I’m pretty sure I’d have an answer for any questions you have.
If you post the model you’re working on we could also have a look and tell you what needs to be done.
thanks for your reply! im just trying to put wheels on this thing and make sure it doesnt tip over.
ive never worked with making cars before, and when i tried to put wheels on this one, it started jumping out of control. (i used this tutorial Bringing Back Simple Cars!) i dont see why i would need to use any scripts with this? i understand where i put the wheels and stuff but i cant understand how to actually rig it with the hinges and such.
HingeConstraints or Class: HingeConstraint have a bunch of properties, like MotorMaxAccleration, which is how fast the hinge tries to reach it’s full speed. If it’s too high the wheels spin and jump.
Also if the AngularVelocity is set too high the wheels can jump.
The wheel’s Size and Density compared to the rest of the car also affect how it handles.
If the MotorMaxTorque is too high the wheels will jump too.
PM me a copy of just the model and I’ll have a look.
thanks!
as in the model of the pumpkin?
You said you made a version and it jumped all around. I meant that version of the pumpkin car model. I can look at it and let you know what’s going on.
of course i deleted that version so ill go ahead and make another one and get back to you in a minute
No rush. I won’t be able to look at it until I’m home later tonight.
for the life of me i cant rig this car :(( makejoints doesnt work on it
Use the Constraints tools in the Model tab in Studio.
Select HingeConstraint and the cursor will now show the Attachment (required, MakeJoints doesn’t know what you are attaching). Place the cursor on the ‘body’ of the car where the HingeConstraint will be attached to.
After you select that point, a second Attachment will appear with the cursor so click the wheel as close as center as you can.
Make sure both Attachments orientations (the yellow and orange arrows when you select the Attachment) are pointing the same direction so the Hinge aligns properly.
You can move the wheel Attachment to 0,0,0 so it’s centered inside the wheel.
Click the Wheel Attachment, copy the GlobalPosition in the Properties window and Copy it.
Click the body Attachment and in the GlobalPosition Paste the data from the previous step.
Now when you script it name the front left wheel HingeConstraint something like FL so your script can reference it.
did everything you told me to, and it still jumped around. i set all the hinge maxaccelerations and torques to 5. still did it
pumpkin car jumpy.rbxm (54.5 KB)
Uh, please use the Model Tab Rotate and Move increments. Trying to work with items that are not place on any kind of increments makes it VERY difficult to build things.
For one your Attachments were placed at uneven heights on the base, so it was only resting on 2 wheels.
Physics takes a few seconds to load. I think that’s partly what made the car jumpy as soon as you play tested it. I waited for a while and it stopped jumping so badly.
I added a script for driving.
I also tuned the wheel Density and size to make it handle a bit better.
If you use a VehicleSeat GUI speedometer remember to change the max speed Property to whatever speed the vehicle travels at. If you have it set to 10 studs/sec and the car does 50 studs/sec it’ll max out the GUI and display 10.
pumpkin car jumpy.rbxm (55.8 KB)
lol thanks so much, i use the increments but its kind of hard when there isnt any tools for symmetricality
There are plugins for the Parts though.
Making things symmetrical without using increments is impossible.
If you snap a Part to a surface using the increments it’ll place it at the closest corner and snap the increments from there.
It helps if you start with Parts that are not sizes like (1.373 x 0.551 x 1.274) studs for example. Your Sizes and placements caused my obsessive compulsive tendencies to almost twist my head off my neck!
i noticed that sometimes when im driving it, it will barely turn when i use A/D. this isnt that bad of a problem, but is there any way i can fix this?
ok bigger problem actually
when i get out sometimes, it will just glitch out
(i have a system that clones the car and puts it into a folder in workspace when a prompt is triggered, is this affecting anything?)
It may just be the weight of the car isn’t very much (because it’s so small) and is being thrown around when the physics of the player jumping off affects it.
I made the wheels really dense but didn’t mess with the Part or the MeshPart Densities.
Try making the base Part Density around 5 to see what happens by checking the CustomPhysicalProperties box and you can set the Density.
I didn’t mess with the pumpkin or other Unions Density because I figured adding mass up that high would make the car want to flip.
Oh, and instead of having all the Unions welded in there to make it yellow, try a Part with a SpecialMesh in it, set to Sphere at the center of the pumpkin. That way you can have just 1 Part and can ‘squash’ the sphere to make it just cover up the red section.
edit 2: neither of the solutions worked i will create a new post
thanks again for your help, and apologies for the amount of replies. im not very great in the physics department
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.