generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Need help with tycoon script

Previous Thread :: Next Thread 
benoit160 is not online. benoit160
Joined: 08 Jul 2009
Total Posts: 1
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image