Help on car script

I’m not sure how I would make my car move. I am concerned that using UserInputService might move the car on the client’s screen but no one else can see it. How would I make it so everyone can see the car being driven by the driver?

welll userimputservice and a remote event will work, just remember to check if the player firing the event is also the driver.

2 Likes

would it be laggy or bit slow on low performance computers for other players when they see the car move?

You can use that. Or you can use " A-Chassis "
https://www.roblox.com/library/426082613/A-Chassis-6-52S2-Kit?Category=Models&SortType=Bestselling&SortAggregation=AllTime&SearchKeyword=A-Chassis&CreatorId=0&Page=1&Position=16&SearchId=22f49594-998e-4a65-9f12-3a1b421ae439

this is a Car kit where you put your car model inside it and it should work. Most of the Car RP games use this model. I hope it helps you!

Roblox Car Tutorial - How to Tune and put on A-Chassis - YouTube this video can help you with “A-Chassis”

1 Like

Thanks for the reference to the kit but I’d really love to script a vehicle myself.

2 Likes

the only thing that might be laggy is the start and end off the car. the server would just have a loop and if something is true then the car moves accordingly. all the client might do is maybe lag out the back of the car, also when i say laggy i mean like for the client, the server will stop it, it just might be delayed because of the client lag

2 Likes

This goes over rigging and scripting a car

1 Like

If you are worried about replication you can just use physics which replicate automatically with Roblox a client - server system as it’s one of the exceptions see the article for more, so you can use physics constraints, or you can use body movers like vector forces which the default jeep in the tool box does I believe.

The tutorial mentioned by @Apxoza should work as well.

Just make sure you give network ownership through a vehicle seat/seat (by default when you sit you gain network ownership I believe)

1 Like