local person;
local Part = script.Parent.Part;
script.Parent.VehicleSeat.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
person = hit.Parent
end
end)
repeat wait() until person ~= nil
mouse = game.Players:GetPlayerFromCharacter(person):GetMouse();
while wait() do
Part.CFrame = CFrame.new(Part.Position, mouse.Hit.p);
Part.Velocity = Part.CFrame.lookVector * 10;
end
|