So, i was making a car spawn gui, so if you click the TextButton it will spawn a car with you ontop of it.
local model = game.Lighting.NissanSkyline
local character = game.Players.LocalPlayer.Character
local Currecy = game.Players.LocalPlayer.leaderstats.CustomizationPoints
local Price = 0
function onClicked()
if Currency.Value >= Price then
Currency.Value = Currency.Value - Price
local a = model:clone()
a.Parent = game.Workspace
wait()
a:MakeJoints()
wait()
a:MoveTo(character.Torso.Position + Vector3.new(0,0,10))
end
end
script.Parent.MouseButton1Click:connect(onClicked)
It works, but when it spawns, all the parts goes flying everywhere.
