|
| 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 |
|
|
| |
|
Blaboblox
|
  |
| Joined: 12 Sep 2008 |
| Total Posts: 8945 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 14 Oct 2012 07:48 AM |
elseif ownstyc.Value == 1 then
|
|
|
| Report Abuse |
|
|
patsfan23
|
  |
| Joined: 02 Mar 2012 |
| Total Posts: 16893 |
|
|
| 14 Oct 2012 07:51 AM |
| it didn't work still. :( aww man. |
|
|
| Report Abuse |
|
|
| |
|