i'm trying to make a car shoot out across a road i've built, and that car is a mesh, but whenever the script runs, it just spawns a part, and i can't use MeshPart since i cannot specify the MeshId with scripts.
the result i'm looking for is a mesh car zooming through and killing the player when it's touched
anyway heres the script
local spawner = game.Workspace
local part = script.Parent
local partspawned = Instance.new("Part", workspace)
while true do
local car = game.Workspace.zoomy.Mesh --zoomy is the car i am trying to clone
wait(10)
partspawned:Clone(car)
car.Velocity = Vector3.new(0,0,-100)
car.Anchored = false
car.Position = part.Position
end
partspawned.Touched:Connect(function(hit)
if game.Players:FindFirstChild(hit.Parent.Name) then
hit.Parent.Humanoid:TakeDamage(math.huge)
end
end)
the meshId for the car is 1490852609 if anyones wondering
edit: changed the script a lil bit edit 2: i have big brained and quite possibly the script could work if i spawned a part, and grouped the mesh in the part
