I’m trying to create a Vehicle Spawner, I have everything set up, but I’d like to move the vehicle to a Spawn Pad.
These are some parts of the script that handle getting s Spawn Pad.
Getting a Spawn Pad:
function GetVehicleSpawnPad()
for _, v in pairs(workspace:WaitForChild("CivilianSpawnPads"):GetChildren()) do
if v:FindFirstChild("BeingTouched") and v.BeingTouched.Value == false then
return v
end
end
return nil
end
local SpawnPad = GetVehicleSpawnPad()
if not SpawnPad then
FE.PushNotification:FireClient(Player, "Red", "No available spawn pads.")
return
end
local VehicleClone = VehicleModel:Clone()
local SpawnLocation = SpawnPad
Moving the vehicle to a Spawn Pad:
VehicleClone:PivotTo(CFrame.new(SpawnLocation.Position) + Vector3.new(0, 5, 0))
This is what happens when a car is spawned and move to a pad.
But the pads are like this in studio