|
| 16 Aug 2013 02:54 PM |
script.Parent.Changed:connect(function(p) if p == 'Text' then local Mouse = game.Players.LocalPlayer:GetMouse() Mouse.KeyDown:connect(function(Key) if (key == script.Parent[p]) then if script.Parent.Parent.Parent.Inventory.Frame.Visible == false then script.Parent.Parent.Parent.Inventory.Frame.Visible = true else script.Parent.Parent.Parent.Inventory.Frame.Visible = false end end end) end end)
There are no outputs, but the GUI wont appear when I hit T (The textbox input) Any ideas why? |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Aug 2013 03:27 PM |
| I really need help :c bump |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 16 Aug 2013 03:28 PM |
You dident explain anything almost to us.
|
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 16 Aug 2013 03:32 PM |
It might be because you connect the event only when the TextBox changes. Try this.
wait() local Mouse = Game.Players.LocalPlayer:GetMouse() local TextBox = script.Parent
Mouse.KeyDown:connect(function(k) if k:lower() == TextBox.Text then script.Parent.Parent.Parent.Inventory.Frame.Visible = not script.Parent.Parent.Parent.Inventory.Frame.Visible end end) |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 03:34 PM |
script.Parent.Changed:connect(function(p) --Check if the textbox has changed if p == 'Text' then --If the textbox's property text is being altered, then local Mouse = game.Players.LocalPlayer:GetMouse() --Find the player's mouse (includes keyboard) Mouse.KeyDown:connect(function(Key) --Check for a keystroke if (key == script.Parent[p]) then --If the key hit matches the textbox's text then if script.Parent.Parent.Parent.Inventory.Frame.Visible == false then -- make sure the frame isnt visible script.Parent.Parent.Parent.Inventory.Frame.Visible = true --if it is, make it visible else script.Parent.Parent.Parent.Inventory.Frame.Visible = false -- all else, make it invisible end end end) end end)
When I type the letter T into the textbox and hit the letter T, nothing happens at all. I'll add some prints to see where it breaks |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
| |
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|