|
| 14 Jul 2015 11:09 AM |
I'm a newbie scripter and need help, i'm using a pre-built tycoon kit. I want: when you buy something, it make the button for the next thing appear. Currently all buttons are visible at the start and i want them to be invisible until you "unlock" them. for exemple at the star only bouton visible would be: "buy 1st dropper" and "buy random thing".
Here is the script inside the "buy button" ------------------------------------------------------------------------------------------------------------------------- model = script.Parent.Parent.Parent.Drop1 Upgradecost = 0 ------------------------------------------------------------------------------------------------------------------------- upgradeStuff = model:clone() wait(1) model:remove() owner = script.Parent.Parent.Parent.OwnerName local ting = 0 function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then if hit.Parent.Name == owner.Value then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Cash") if cash.Value > (Upgradecost-1) then cash.Value = cash.Value - Upgradecost upgradeStuff.Parent = script.Parent.Parent.Parent script.Parent.Parent:remove() end end end end ting = 0 end end script.Parent.Touched:connect(onTouched)
What do i have to change so i can put it in the model of the previous thing the player have to buy ? |
|
|
| Report Abuse |
|
cbhusker
|
  |
| Joined: 07 Feb 2011 |
| Total Posts: 517 |
|
|
| 14 Jul 2015 11:18 AM |
i'm pretty sure for tycoons, you don't have to do much scripting for that... I think you just have to make BuyFirstDropper button the parent of the other buttons.
I'm not sure with your specific tycoon kit, but you'll just have to try. Hope this helps. |
|
|
| Report Abuse |
|