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: TextBox inputs

Previous Thread :: Next Thread 
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
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
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
16 Aug 2013 03:12 PM
bump
Report Abuse
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
16 Aug 2013 03:27 PM
I really need help :c bump
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:28 PM
You dident explain anything almost to us.
Report Abuse
Ekkoh is not online. 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
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
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 is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
16 Aug 2013 03:36 PM
Did you try mine?
Report Abuse
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
16 Aug 2013 03:37 PM
Yea, It works now :3 ty
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
17 Aug 2013 09:16 PM
So... yours works?
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