Hi, I do not know how to make working vehicles in Roblox and I need tanks and cars for my game. I would appreciate it if someone could show me how to make vehicles in Roblox.
Working vehicles are definitely a challenge for any programmer in Roblox.
To get started, I would recommend understanding more about what you want the vehicle to be able to do.
- Will it be PC based? Mobile support?
Once this is figured out and your vehicle models are made, you can add the main chassis.
There are many tutorials out there, but my personal favorite is one by Insider Tech:
The video was created by AlvinBlox, another favorite of mine.
The tutorial goes through the fundamental setup of a vehicle and what it does.
To add more functionality to it, you can add more to the script.
For example, if you have a tank, and you want the tank to shoot a bullet when a key is pressed, you could add something like:
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(Input)
if (UserInputService:GetFocusedTextBox()) then
return; --Make sure that the player is not chatting
end
if Input.KeyCode == Enum.KeyCode.F then --Key being detected.
ShootTankBulley() --The function to shoot a bullet out of a tank
end
end)
Optionally, you could also use pre-made vehicles from the toolbox that you could take and use the chassis from. A-Chassis is a popular chassis, which most vehicles in the toolbox utilize.
Hope this helps. If you have any other questions, feel free to reply.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.