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: Tycoon button script not working.

Previous Thread :: Next Thread 
crazyburger is not online. crazyburger
Joined: 06 Sep 2008
Total Posts: 2313
13 Oct 2012 06:58 PM
I'm making a tycoon and I made this script for the entrance of the tycoon. The script don't work, the output is clear. Obviously I have another script to put the IntValues in the player(line 11) and I know that script works. Any help appreciated.


owner = script.Parent.Parent.Parent.OwnerName
debounce = 0

script.Parent.OnTouched:connect(function(hit)
if debounce == 0 then
debounce = 1
hum = script.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
thisplr = game.Players:FindFirstChild(hit.Parent.Name)
if (thisplr~=nil) then
ownstyc = thisplr:FindFirstChild("Tycoon")
if (ownstyc~=nil) then
if ownstyc.Value == 0 then
ownstyc.Value = 0
owner.Value = Thisplr.Value
message = Instance.new("Message")
message.Text = "You now own this tycoon!"
message.Parent = thisplr
wait(2)
message:remove()
script.Parent:remove()
elseif ownstyc.Value = 1 then
message = Instance.new("Message")
Message.text = "You already own a Tycoon!"
message.Parent = thisplr
wait(2)
message:remove()
debounce = 0
end
end
end
end
end
end
end)
Report Abuse
crazyburger is not online. crazyburger
Joined: 06 Sep 2008
Total Posts: 2313
13 Oct 2012 07:12 PM
Buump
Report Abuse
Blaboblox is not online. Blaboblox
Joined: 12 Sep 2008
Total Posts: 8945
13 Oct 2012 07:21 PM
What's the output saying?
Report Abuse
crazyburger is not online. crazyburger
Joined: 06 Sep 2008
Total Posts: 2313
14 Oct 2012 06:52 AM
The output is saying this;

12:51:48 - Workspace.Entry.Step on me to buy this land!.Head.Script:22: 'then' expected near '='

but there is a "then" in the correct postion, isn't there?:L

Report Abuse
patsfan23 is not online. patsfan23
Joined: 02 Mar 2012
Total Posts: 16893
14 Oct 2012 07:19 AM
do it again. if i dosen't work. reset GUI. then try it.
Report Abuse
crazyburger is not online. crazyburger
Joined: 06 Sep 2008
Total Posts: 2313
14 Oct 2012 07:28 AM
Still not working.
Report Abuse
human is not online. human
Joined: 06 May 2007
Total Posts: 2765
14 Oct 2012 07:48 AM
elseif ownstyc.Value == 1 then
Report Abuse
patsfan23 is not online. patsfan23
Joined: 02 Mar 2012
Total Posts: 16893
14 Oct 2012 07:51 AM
it didn't work still. :( aww man.
Report Abuse
crazyburger is not online. crazyburger
Joined: 06 Sep 2008
Total Posts: 2313
14 Oct 2012 08:40 AM
@Human

Still wont work:(
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