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: How do I know if the Chatbar is selected?

Previous Thread :: Next Thread 
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
23 Feb 2015 10:05 AM
Hi,

I need to know at the beginning of running a localscript, if the users chatbar is selected. In other words, if he is typing a message or simply selected the chatbar for typing.

Is there a way to do this? I found none sofar :/
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
23 Feb 2015 10:09 AM
I don't think you can access any events or properties of coreguis.
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
23 Feb 2015 10:14 AM
I don't think there's a way to do it with roblox's default chat bar. Make a custom chat system, and then you can use roblox's TextBox (which allows you to see if it's selected)
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
23 Feb 2015 10:54 AM
Why not use the KeyDown event for the key "/" to check if they are typing. And, you can make an invisible TextButton, with the size and position of the normal chatbar, and use the MouseButton1Click event to see if it was interacted with.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
23 Feb 2015 10:57 AM
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

mouse.KeyUp:connect(function(k)
if k == "/" then
print("This user is now chatting")
end
end)
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
23 Feb 2015 10:58 AM
@warspyking

Ew, Use InputService


Give me 15 Robux I give you print("Give me 15k")
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
23 Feb 2015 11:21 AM
But some idiots use the mouse button to click the chat bar, so that'd be too un-reliable.
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
23 Feb 2015 11:23 AM
"And, you can make an invisible TextButton, with the size and position of the normal chatbar, and use the MouseButton1Click event to see if it was interacted with."

You can put guis over roblox's hud? :O
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
23 Feb 2015 11:24 AM
You joined on my moms birthday in 2008. :o
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
23 Feb 2015 11:25 AM
@sly

No, I think CoreGUIS always have the benefit when it comes to ZIndex.
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
23 Feb 2015 11:26 AM
That's what I thought before, so I guess the only way is to make a custom chat system.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
23 Feb 2015 11:26 AM
Anyways, to do this I recommend using "hax" to get the CoreGUI for "Chat" and making a fake chat bar, but it would still be functional? Basically cloning it and then using an event to see if it's active.
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
23 Feb 2015 11:31 AM
You don't need to use "hax" to get CoreGui's

https://github . com/ROBLOX/Core-Scripts


Give me 15 Robux I give you print("Give me 15k")
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Feb 2015 11:42 AM
As everyone has mentioned, there is no inherent way of getting if the user has the chat bar selected without using 'hacky' methods. Your best chance is in making a fake chat bar or checking for differences in the mouse input and UIS
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Feb 2015 12:13 PM
You don't need UIS to see if it is selected though, do you? (I didn't read the above posts much)
You can just use the event that I thought existed on TextBoxes?
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
23 Feb 2015 12:14 PM
@Jarod, yeah... I don't know why people want to use UIS.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 Feb 2015 12:17 PM
That's why I said or.

Use a fake chat bar and use the event, or keep the current one and use UIS and Mouse differences to determine.
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
23 Feb 2015 12:20 PM
You could keep the current one and see if they press "/" and then also checked the Mouse's Y position then check the Mouse Click.


Give me 15 Robux I give you print("Give me 15k")
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
23 Feb 2015 02:34 PM
Thing is, the chatbar might already be selected when the script starts running and THAT is when I need to know if its originally selected or not.

I tried the "hax" method:
local CoreGuiService = game:GetService('CoreGui')
local chatbar = CoreGuiService.RobloxGui.Chatbar
print(chatbar)
As I believe i read on the wiki, this section yields an error if tried to be used.

Guess there is no solution..
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
25 Feb 2015 03:54 AM
THANK GOODNESS! Roblox added PlayerScripts (still not enabled tho)
With it I can keep localscripts that runs even when player dies!
Goodeh! GOOODEH! :D Exacly what I need!
Report Abuse
VoltiCoil is not online. VoltiCoil
Joined: 20 Nov 2008
Total Posts: 1227
13 Apr 2015 02:16 PM
If you still need a method for this, PM me. I have a method of solving this using the userinput event.
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
13 Apr 2015 02:21 PM
http://www.roblox.com/games/228768346/lokkuts-Place-Number-216

like this?
Report Abuse
VoltiCoil is not online. VoltiCoil
Joined: 20 Nov 2008
Total Posts: 1227
14 Apr 2015 02:33 AM
No, detecting when the chat is actively in use. Not a chat gui....
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
14 Apr 2015 02:37 AM
"THANK GOODNESS! Roblox added PlayerScripts (still not enabled tho)
With it I can keep localscripts that runs even when player dies!
Goodeh! GOOODEH! :D Exacly what I need!"

It was actually active for like 3 days, must have been full of bugs lol.


I script -~ chimmihc
Report Abuse
oldroland is not online. oldroland
Joined: 04 Jul 2008
Total Posts: 44
14 Apr 2015 02:41 AM
guise its script.parent learn h0w 2 scriptah liek da pr0

Bam. Easy.
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