So yesterday I spend a few hours learning how to make a GUI to buy a vehicle. I the GUI, threw together the script and put the vehicle in Lighting, but it wont work. Can someone help me out? Thanks!
local model = game.Lighting.Omicron local character = game.Players.LocalPlayer.Character local Currecy = game.Players.LocalPlayer.leaderstats.Money 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)