This is the script I put here in Button in UI
local player = game.Players.LocalPlayer --Assuming the script is a localscript, you can shorten this. local cost = 15000 script.Parent.MouseButton1Click:connect(function() local leaderstats = player:FindFirstChild("leaderstats") --You don't need nearly as many if statements as you had, since if the code results in error, it will stop running and can be recalled when the button is pressed again. local money = leaderstats:FindFirstChild("Money") if money.Value >= cost then local spawncar = game.ReplicatedStorage.Vehicles["Camaro 2017"]:Clone() spawncar.Parent = workspace money.Value = money.Value - 15000 script.Parent.Text = "Bought" script.Disabled = true else script.Parent.FontSize = 20 script.Parent.Text = "Not enough $" end end)
The problem is that everything works except when I get in the car it seems that there is no DriveSeat. does anyone know why?