Hello I want to drive a bus straight without a driver
I tried going to the driveseat and set the throttle to 1 and it did not work
Please help
Hello I want to drive a bus straight without a driver
I tried going to the driveseat and set the throttle to 1 and it did not work
Please help
It depends on the context of your game - if you’re aiming to recreate games such as Bus Simulator, just give the wheels a simple rotation animation and make the environment move. If you want to make it drive straight for a game that isn’t Bus Simulator, I’m not sure - maybe you can use a method in the module script to drive it?
just to make it straight till now
I’m sorry I don’t quite understand what that message meant but if you just want it to drive straight use one of my methods.
What’s your script. I use a Server Script and have this in it.
It works fine when throttle changes.
local seat = script.Parent:WaitForChild("VehicleSeat")
local speed = 2
seat:GetPropertyChangedSignal("Throttle"):Connect(function()
--speed = seat.CFrame.LookVector:Dot(seat.Velocity)
--print(speed)
--if seat.Occupant ~= nil then
for i,v in pairs(script.Parent:GetDescendants()) do
if v:IsA("HingeConstraint") then
v.AngularVelocity = speed * -seat.Throttle
end
end
end)
If you want to make it drive straight, but you want it to turn later on you are going to need 2 different ways of moving it.
If it’s only going to be a straight line you can use a PrismaticConstraint. This allows players to move on it as well.
If you plan on have it drive a route try using the Search tool up top using train movement as your search term. This can make the bus follow a road and stop at different stops.
I meant that I want it to keep driving straight and I will try ur methods