Im trying to work with moving a vehicle. Im not looking into Motor6D's right now, im just fiddling with some stuff on my own. Im trying to see if I can execute this while loop function at the same time as another, and for that im trying to use the "spawn()" function. However, I always get the error, "Spawn function requires 1 argument." Here is my code:
local MoveVehicle = function(MoveTo)
local TweenProperties = {
CFrame = Vehicle.CFrame * MoveTo
}
local Tween = TweenService:Create(Vehicle,TweenInfo,TweenProperties)
Tween:Play()
CurrentTween = Tween
end
spawn(MoveVehicle(CFrame.new(0,0,-100)))
There is much more, but these are the only relevant sections. As far as I can tell im passing the Function "MoveVehicle" as the argument for the built-in function "spawn", so I honestly have no clue whats happening here.
