|
| 22 Dec 2011 06:05 PM |
For some reason this script makes you own MORE than 2 tycoons and I can't find a solution! Sorry for the wrong forum but no one replies there for me...
local tycoon = script.Parent.Parent.Parent local owner = tycoon.Owner local debounce = false
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil and debounce == false then local alert = player.PlayerGui.TycoonGui.Alert debounce = true if player.Tycoon.Value == true then alert.Text = "You already own a tycoon!" alert.Type.Value = "Alert" alert.On.Value = true return end owner.Value = player.Name player.Tycoon.Value = true alert.Text = "You now own this tycoon, " ..player.Name.. "!" alert.Type.Value = "Message" alert.On.Value = true for i = 0.4, 1, 0.01 do wait() script.Parent.Transparency = i end script.Parent.Parent:Remove() end wait(2) debounce = false end) |
|
|
| Report Abuse |
|
|
bob354293
|
  |
| Joined: 26 Oct 2008 |
| Total Posts: 2609 |
|
|
| 22 Dec 2011 06:07 PM |
| im good with tycoons, i have loads of them, is this tycoon a tycoon with gui buttons by any chance? :p and what you mean it makes you own more then one? |
|
|
| Report Abuse |
|
|
bob354293
|
  |
| Joined: 26 Oct 2008 |
| Total Posts: 2609 |
|
|
| 22 Dec 2011 06:09 PM |
happened to notice that you didnt put if debounce == false then ...
local tycoon = script.Parent.Parent.Parent local owner = tycoon.Owner local debounce = false
script.Parent.Touched:connect(function(hit) if debounce == false then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil and debounce == false then local alert = player.PlayerGui.TycoonGui.Alert debounce = true if player.Tycoon.Value == true then alert.Text = "You already own a tycoon!" alert.Type.Value = "Alert" alert.On.Value = true return end owner.Value = player.Name player.Tycoon.Value = true alert.Text = "You now own this tycoon, " ..player.Name.. "!" alert.Type.Value = "Message" alert.On.Value = true for i = 0.4, 1, 0.01 do wait() script.Parent.Transparency = i end script.Parent.Parent:Remove() end wait(2) else end debounce = false end) |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 06:09 PM |
Add an IntValue that goes up every time you own a tycoon, and if the number is 2, then it doesn't give you the tycoon.
What Pumpkin? |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 06:09 PM |
| Well, it IS a tycoon that makes a blue gui appear when you buy something, own a tycoon, or buy something that you don't have enough money for. And to answer your question, when you enter the game, you can own more than 1 tycoon and noobs crash the game. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 06:12 PM |
| Ok, I'll try that and see if it works. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 06:15 PM |
| Nope didn't work. And sam, if you could post the script with the IntValue like you said? My friend made me this script and I have to use it. |
|
|
| Report Abuse |
|
|
| |
|