|
| 24 Jul 2013 12:28 AM |
How can I connect Tycoon1 with where you buy them in the gui? script.Parent.Frame.Land1.Sold.Visible = true is what I wanna do to variable z if it's sold D:
Tycoon1 = Tycoons:findFirstChild:("") --HAD TO REMOVE THIS, they are realistic adresses Tycoon2 = Tycoons:findFirstChild:("") Tycoon3 = Tycoons:findFirstChild:("") Tycoon4 = Tycoons:findFirstChild:("") Tycoon5 = Tycoons:findFirstChild:("") Tycoon6 = Tycoons:findFirstChild:("") list = {Tycoon1, Tycoon2, Tycoon3, Tycoon4, Tycoon5, Tycoon6}
function checkSold(Address) local Tycoonz = game.Workspace.Tycoons:GetChildren() for i,v in pairs(Tycoonz) do if v.Owned.Value ~= 0 then if v.Name == Address then return true else return false end end end end
for i,v in pairs(list) do if checkSold(v) then end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Jul 2013 12:40 AM |
| Why do people CREATE people script but won't help someone who is legit trying to learn >.< |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
andirja11
|
  |
| Joined: 11 Jul 2010 |
| Total Posts: 584 |
|
|
| 24 Jul 2013 04:23 PM |
| Because we don't even know what is the problem ._. |
|
|
| Report Abuse |
|
|
OddChrono
|
  |
| Joined: 13 Oct 2006 |
| Total Posts: 55 |
|
|
| 24 Jul 2013 04:24 PM |
| Your script makes no sense sir. Although I'm sure we could tell you how to make a gui buy script. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 04:27 PM |
I am making a buy tycoon by GUI rather then touch buttons :P And I need to know how to connect Tycoon1 to Land1 in the gui to make Land1.SOLD.Visible = true (which is in the table and I need to know how to make it work D:) |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 04:31 PM |
What script does STEP by STEP:
--Get all tycoons and puts them into a list --Check if Tycoon.Value ~= 0 --if it's Tycoon1-6 it makes Land1-6.Sold.Visible = true (the tycoon numbers line up with the land numbers) |
|
|
| Report Abuse |
|
|
OddChrono
|
  |
| Joined: 13 Oct 2006 |
| Total Posts: 55 |
|
|
| 24 Jul 2013 04:33 PM |
First, you must place the tycoon building were it will appear on the map. then put it in lighting and heres your script put this in the button. It's formatted for a button inside a GUI Cash = script.Parent.Parent.Parent.Parent.leaderstats.Money --Name of Currency If you put this button inside a frame add another parent.
function onClick() if Cash.Value >= 800 then -- price Cash.Value = Cash.Value - 800 --replace with price local Tycoon = game.Lighting.Tycoon1:clone() RockLaunch.Parent = script.Parent.Parent.Parent.Parent.Parent.StarterGear local Tycoon = game.Lighting.Tycoon1:clone() Tycoon.Parent = Workspace Tycoon.Handle.Anchored = false end end
script.Parent.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
OddChrono
|
  |
| Joined: 13 Oct 2006 |
| Total Posts: 55 |
|
|
| 24 Jul 2013 04:34 PM |
Cash = script.Parent.Parent.Parent.Parent.leaderstats.Money --Name of Currency If you put this button inside a frame add another parent.
function onClick() if Cash.Value >= 800 then -- price Cash.Value = Cash.Value - 800 --replace with price local Tycoon = game.Lighting.Tycoon1:clone() RockLaunch.Parent = script.Parent.Parent.Parent.Parent.Parent.StarterGear local Tycoon = game.Lighting.Tycoon1:clone() Tycoon.Parent = Workspace end end
script.Parent.MouseButton1Click:connect(onClick)
sorry had to fix it. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2013 04:40 PM |
| I know how to make it where you can Purchase a tycoon I am trying to make a textlabel that says sold appear if the tycoon is already sold... otherwise the players will click the tycoon and it will already be sold and won't work and maybe have to press EVERY button until they get on that isn't sold :P |
|
|
| Report Abuse |
|
|