I am making a car. Here is the code.
local tractor = script.Parent
local stats = tractor.Configurations
local v = tractor.VehicleSeat
local bodyPos = tractor.Chassis.BodyVelocity
local bodyGyro = tractor.Chassis.BodyAngularVelocity
local runService = game:GetService("RunService")
local lookVec = nil
tractor.VehicleSeat.Changed:Connect(function(property)
if property == ("Steer") then
bodyGyro.AngularVelocity = Vector3.new(0,v.Steer*-5000,0)
lookVec = v.CFrame.LookVector
elseif property == ("Throttle") or lookVec--here I need help-- then
lookVec = v.CFrame.LookVector
print(v.Throttle)
bodyPos.Velocity = lookVec * 16 * v.Throttle
end
end)
As you can see, I just put "or lookVec", but how do I find if lookVec's values have changed? Your Breakfast, TheFierceWaffle

1 comment
This helps very much! It is very "hacky", but what must be done must be done!