|
| 10 Jan 2015 12:57 AM |
I was making a thing where the player clicks on a key to add it to a GUI "inventory". I'm aware that this is set up so that it would only modify the PlayerGui of "Player", I was just testing it ATM. My issue is that the Boolean Value "HaveKey" isn't working for some reason.
"clickd = game.Workspace.Key1.ClickDetector
clickd.MouseClick:connect(function() game.Workspace.Key1.ClickDetector.MaxActivationDistance = -1 game.Workspace.Key1.Transparency = 1 game.Players.Player.PlayerGui.Gotswag.Gotkey.Visible = true wait(1) game.Players.Player.PlayerGui.Gotswag.Gotkey.Visible = false game.Players.Player.PlayerGui.Gotswag.Havekey.Visible = true game.Workspace.HaveKey.Value = true end)"
"HaveKey is not a valid member of Workspace" |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 10 Jan 2015 01:29 AM |
"HaveKey is not a valid member of Workspace"
Is there an object name "HaveKey" in Workspace? What the output you posted say is that it can not find that object in Workspace.
|
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 10 Jan 2015 08:34 AM |
| Make sure that "HaveKey" is actually a boolean value and not some other value |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 08:42 AM |
This means it could not find this object.
This could be a localscript + serverside error. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jan 2015 04:36 PM |
| The BoolValue "HaveKey" definitely exists. I'm not very experienced with Lua, could you clarify what you mean by WaitForChild? I know what it does, but I don't understand what the application would be in this situation. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 04:39 PM |
| Also, to clarify a bit more, this ISN'T a local script. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 07:28 PM |
| Bumping because this is really annoying. All other Boolean Values work fine, but not "HaveKey" for some reason. I think it may be a problem with the script itself. |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 10 Jan 2015 07:32 PM |
Does a BooleanValue object exist in Workspace?
Is the Script in Workspace?
Is FilteringEnabled set to false in Workspace?
If you answer no to any of these please tell us which ones. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 07:55 PM |
| The script is the child of the part that acts as a button. That's the problem, isn't it? |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 11:53 PM |
| Still not sure what the problem is. Parenting the script to the Workspace instead makes no difference. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 11:55 PM |
| Welp, I'm an idiot. I misspelled "Key" in the name of the BoolValue. Sorry for wasting everyone's time. |
|
|
| Report Abuse |
|
|