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 » Scripters
Home Search
 

Re: Typing on Screen GUIS

Previous Thread :: Next Thread 
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 11:06 AM
Is there a way to make it so that when a player sits in a chair their keyboard connects to the screen gui? And they can type on it?
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Dec 2016 11:07 AM
textbox


-Sublivion
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 11:11 AM
I understand that, but the keyboard won't just "connect automatically" to the surfacegui. My mistake i meant Surface GUI!
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Dec 2016 11:13 AM
keylogger


-Sublivion
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 11:18 AM
A little more detail? Thanks!
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Dec 2016 11:20 AM
srry was eating

You would do something like this

local string
local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(obj, gpe)
string + string.. obj.KeyCode
end)


-Sublivion
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 11:28 AM
Im unfamiliar with this, How would i set this up so that when a player sits in a chair their keyboard connects with the surface gui?
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Dec 2016 11:30 AM
You would just check for joints in the seat, then use user input service to detect the input that the user is making then ouput it to the surfacegui.


-Sublivion
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 11:58 AM
Having trouble with this, do you mind setting it up?
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
22 Dec 2016 12:00 PM
Can't do it for you


-Sublivion
Report Abuse
CommanderCornbread is not online. CommanderCornbread
Joined: 14 Dec 2009
Total Posts: 73
22 Dec 2016 12:17 PM
Chair.ChildAdded:connect(function(child)
if child.Name == "SeatWeld" then
Player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
-- Connect an event here for the player's keyboard input
end
end)

Will wait for a Weld named "SeatWeld" to be added to the chair and will get the player from the child's parent.

As for UserInputService, you can easily learn that on roblox wiki.
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 05:36 PM
--[[Variables Here]]--

local Chair = script.Parent
local string
local UIS = game:GetService("UserInputService")
local G = game.Workspace.G.Sign.SurfaceGui
--[[Functions Here]]--
Chair.ChildAdded:connect(function(child)
if child.Name == "SeatWeld" then
local Player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
-- Connect an event here for the player's keyboard input--
print("Got Player")

wait()

--[[Output Whatever the player is typing onto the Surfacegui Textbox]]--


end
end)


Thank you, This is what i got so far, stuck on the actual outputting of it onto the textbox
Report Abuse
austinfl is not online. austinfl
Joined: 14 Sep 2013
Total Posts: 191
22 Dec 2016 05:43 PM
One idea is in the start of the game having the screen GUI already with the player, just not visible. Then your seat just makes it visible.

Also you shouldn't make a script wait for players to type. It should be that the player types something, clicks a button (a GUI button if you want) and then another script sends the data back to the chair or whatever you want to do with the text.
Report Abuse
KitsuneMurasaki is not online. KitsuneMurasaki
Joined: 09 Jul 2013
Total Posts: 136
22 Dec 2016 05:46 PM
I've done that before, and ahhhh good to know. This is different. It's a surface GUI.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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