Hello, I have been trying to make a brick that you can click, then it shows a GUI (Price of the car, etc.) with a purchase button. You are able to click this then it subtracts from your leaderboard value, spawning in the vehicle around the back of the dealership.
Heres what I did,
Leaderboard with a currency called Money
Grouped the car and stuck it into lighting
Created a brick with the click interest thing ( sorry for not knowing proper name)
added a Gui to the brick
Added this local script I found on another forum because I am too dumb for LUA
changed it to suit my game
local model = game.Lighting.CARNAME local character = game.Players.LocalPlayer.Character local Currecy = game.Players.LocalPlayer.leaderstats.CURRENCYNAME local Price = CARPRICE
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)
*****Now I can click the brick with the correct amount of cash
nothing happens*****
*Also I was using this forum for support but I found it confusing and frustrating, so heres what I was trying * (http://http://forum.roblox.com/Forum/ShowPost.aspx?PostID=47665591)
Please help me.