I have the script to spawn cars works everything but the car not why?
Asked by
5 years ago Edited 5 years ago
This is the script I put here in Button in UI
01 | local player = game.Players.LocalPlayer |
04 | script.Parent.MouseButton 1 Click:connect( function () |
05 | local leaderstats = player:FindFirstChild( "leaderstats" ) |
06 | local money = leaderstats:FindFirstChild( "Money" ) |
07 | if money.Value > = cost then |
08 | local spawncar = game.ReplicatedStorage.Vehicles [ "Camaro 2017" ] :Clone() |
09 | spawncar.Parent = workspace |
10 | money.Value = money.Value - 15000 |
11 | script.Parent.Text = "Bought" |
12 | script.Disabled = true |
14 | script.Parent.FontSize = 20 |
15 | script.Parent.Text = "Not enough $" |
The problem is that everything works except when I get in the car it seems that there is no DriveSeat. does anyone know why?