DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 30 Apr 2015 09:05 PM |
script.Parent.MouseButton1Down:connect(function() if script.Parent.MouseButton1Down:connect was game.Players.DevKonner then script.Parent.Parent.Parent.Visible = false script.Parent.Parent.Parent.Parent.Options.Visible = true else end end)
The "was" is red underline and I dont know how to word it in Lua. Help? |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 01 May 2015 08:10 AM |
script.Parent.MouseButton1Down:connect(function()
Put "player" into the parathesis, like this
script.Parent.MouseButton1Down:connect(function(player)
And change this line
if script.Parent.MouseButton1Down:connect was game.Players.DevKonner then
into this
if player.Name == "DevKonner" then |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 01 May 2015 03:10 PM |
| I got an error saying that "attempt to index local 'player' a number value" |
|
|
| Report Abuse |
|
|
9draco
|
  |
| Joined: 13 Nov 2010 |
| Total Posts: 5841 |
|
|
| 01 May 2015 03:13 PM |
Try this player = game.Players |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
9draco
|
  |
| Joined: 13 Nov 2010 |
| Total Posts: 5841 |
|
|
| 01 May 2015 03:21 PM |
Try this then player = game.Players.LocalPlayer |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 01 May 2015 03:43 PM |
player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function(player) if player.Name == "Player" then script.Parent.Parent.Parent.Visible = false script.Parent.Parent.Parent.Parent.Options.Visible = true else end end)
Still not working |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
|
| 01 May 2015 04:22 PM |
players = {Player = true, lilblitz56 = true, DevKonner = true} --[[People you want this to show up for, change it to whoever :P) if players[script.Parent.Parent.Parent.Name] then script.Parent.Parent.Parent.Visible = false script.Parent.Parent.Parent.Parent.Options.Visible = true else end
Just change the "if players[script.Parent.Parent.Parent.Name] then" so it gets the name of the player that the gui is in. This should work, I tested it a few times :) |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 01 May 2015 06:04 PM |
| Alright, im still a little confused. I will party you when my update is done on my main computer |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 01 May 2015 06:05 PM |
| LocalPlayer does not work unless it's a localscript |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
| |
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 01 May 2015 10:54 PM |
script.Parent.MouseButton1Down:connect(function(player) if game.Players.LocalPlayer == 'Player' then script.Parent.Parent.Parent.Visible = false script.Parent.Parent.Parent.Parent.Options.Visible = true end end)
Its a local script. I got no errors. BUt its not working. When I removed the "if" line and the "end" line It works. But my goal is to have a certain person that clicks the button it, it would show them the opionion. If a person who cannot click it wont work |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 02 May 2015 04:18 AM |
Where is this located? Put this localscript in StarterGui:
script.Parent.MouseButton1Down:connect(function(who) if who.Name == "DevKonner" then script.Parent.Parent.Parent.Visible = false script.Parent.Parent.Parent.Parent.Options.Visible = true else end end) |
|
|
| Report Abuse |
|
|
DevKonner
|
  |
| Joined: 04 Feb 2012 |
| Total Posts: 519 |
|
|
| 02 May 2015 08:19 AM |
Take this item. http://www.roblox.com/My/Item.aspx?ID=244365269
See whats going on. |
|
|
| Report Abuse |
|
|