I have a car spawner, or should I say, multiple car spawners. I been trying these following..
:MoveTo() Keeps failing to go to the position after the cover shows but goes to the original position which is not even near the place I want it to spawn at.
:TranslateBy() I tryed two different versions. At first I thought this would CFrame the part correctly, but no, I was wrong. It 'moves it'.. After knowing that. I made it TranslateBy to 0,0,0 and then TranslateBy back to the CFrame position I want.. Results? 80 studs away from normal position, and gets destroyed by nil.
I am stressed with not being able to use just one model to help supply unlimited other spawners. Please, any help?
function GenerateCar()
--pcall(function() LastCar:Destroy() end)
script.Parent.Gen.BillboardGui.Frame.Visible=true
script.Parent.Gen.BillboardGui.Frame.TextLabel.Text="Covering Area."
local clone=game.ServerStorage.Car:clone()
clone:MoveTo(script.Parent.Cover.Position)
clone.Archivable=false
wait()
for a=.2,8.2,.2 do
script.Parent.Cover.Size=Vector3.new(18,a,10)
script.Parent.Cover.CFrame=script.Parent.Part.CFrame+Vector3.new(0,a/2,0)
wait()
end
wait(.8)
script.Parent.Gen.BillboardGui.Frame.TextLabel.Text="Generating Car."
wait(.8)
local model=Instance.new("Model",Workspace)
model.Name="TCar"
LastPos=clone.VehicleSeat.Position
local all=clone:getChildren()
for a=1,#all do
if all[a]:IsA("BasePart") then
all[a].Anchored=true
end
all[a].Parent=model
wait()
end
model:MakeJoints()
script.Parent.Gen.BillboardGui.Frame.TextLabel.Text="Uncovering."
wait(.8)
--Continues on, but the problem is above.
