ChatGPT really never helps.
The local script that fires to spawn the car is
local SelectedCar = game.ReplicatedStorage.CarSystem.SelectedCar.Value
print(SelectedCar)
game.Players.LocalPlayer.PlayerGui.Civ_Car_Spawn.Enabled = false
game:GetService("ReplicatedStorage").VehicleSpawnRequest:FireServer(SelectedCar)
end)
The server script to spawn the car is
local RS = game:GetService("ReplicatedStorage")
RS.VehicleSpawnRequest.OnServerEvent:Connect(function(SelectedCar, Plat)
-- Car & Clone Car Variables
local Car = SelectedCar
local CloneCar = Car:Clone()
-- Spawning Positions
local Position1 = game.Workspace["Civilian Spawn"].CarSpots.S1.Position
local Position2 = game.Workspace["Civilian Spawn"].CarSpots.S2.Position
local Position3 = game.Workspace["Civilian Spawn"].CarSpots.S3.Position
local Position4 = game.Workspace["Civilian Spawn"].CarSpots.S4.Position
local Position5 = game.Workspace["Civilian Spawn"].CarSpots.S5.Position
local PossibleSpawns = {Position1, Position2, Position3, Position4, Position5}
-- If car then print car, but if not car then print not car.
if Car then
print(Car)
else
print("No Car")
end
-- Set CloneCar's position to one of PossibleSpawns declared under the PossibleSpawns variable
--CloneCar:SetPrimaryPartCFrame(CFrame.new(PossibleSpawns[math.random(1, #PossibleSpawns)]))
-- Set CloneCar's name to the player's username and add it to the workspace
CloneCar.Name = Plat .. "'s Car"
CloneCar.Parent = game.Workspace
end)