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 » Scripting Helpers
Home Search
 

Re: HELP!!!

Previous Thread :: Next Thread 
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
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 is not online. 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 is not online. 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
Sam010100001 is not online. Sam010100001
Top 100 Poster
Joined: 09 Aug 2009
Total Posts: 34814
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
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
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
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
22 Dec 2011 06:12 PM
Ok, I'll try that and see if it works.
Report Abuse
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
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
CanIBeYourFriend12 is not online. CanIBeYourFriend12
Joined: 20 Mar 2010
Total Posts: 2371
22 Dec 2011 06:18 PM
Bump.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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