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: GUI that appears when someone says something specific?

Previous Thread :: Next Thread 
storyofmlg is not online. storyofmlg
Joined: 10 Feb 2016
Total Posts: 41
09 Jan 2017 12:01 PM
I'm making a hotline place where people can go to quickly ask a question and get answers, by bots or administrators. How would I make it so when a player says something specific, like "mystery", a GUI that I made will pop up for that player? I want to set this up so if a player says something specific like a game's name, a GUI will pop up telling them where they can go to get help on that topic. I'd like the script for this please, if possible.
Report Abuse
DylWithlt is online. DylWithlt
Joined: 30 Apr 2008
Total Posts: 300
09 Jan 2017 12:03 PM
Try playing with string manipulation you'd use string.lower, and string.match to find keywords the player said and check if it's not nil


Report Abuse
storyofmlg is not online. storyofmlg
Joined: 10 Feb 2016
Total Posts: 41
09 Jan 2017 12:05 PM
I don't really know how to do that. I know how to script in basic aspects, but I don't know how I would do that. That's why I asked for the script :P
Report Abuse
TakeoHonorable is online. TakeoHonorable
Joined: 25 Jul 2012
Total Posts: 149
09 Jan 2017 12:12 PM
The script you want would probably look something like this.



GUI = script.Parent:WaitForChild("GUI") -- Assuming the GUI is defined.

game.Players.PlayedAdded:Connect(function(player)
player.Chatted:Connect(function(string,plr)
if string == "mystery" then
if not plr.PlayerGui:FindFirstChild("GUI") then
local GUIClone = GUI:Clone();GUIClone.Parent = plr.PlayerGui
end
end
end)
end)


Report Abuse
DylWithlt is online. DylWithlt
Joined: 30 Apr 2008
Total Posts: 300
09 Jan 2017 12:12 PM
We'd need to know exactly what you wanted for a script but heres something similar:

game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg,to)
if string.match(string.lower(msg),"Keyword") then
showgui()
end
end)
end)


Report Abuse
TakeoHonorable is online. TakeoHonorable
Joined: 25 Jul 2012
Total Posts: 149
09 Jan 2017 12:13 PM
[CORRECTION]

Here's the fixed one


GUI = script.Parent:WaitForChild("GUI") -- Assuming the GUI is defined.

game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(string,plr)
if string == "mystery" then
if not plr.PlayerGui:FindFirstChild("GUI") then
local GUIClone = GUI:Clone();GUIClone.Parent = plr.PlayerGui
end
end
end)
end)


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
09 Jan 2017 12:13 PM
Do this locally instead. No reason to do it on the server.
Plus, if you're in FE, the server cannot access the player's PlayerGui for items unless it puts them there.


Report Abuse
DylWithlt is online. DylWithlt
Joined: 30 Apr 2008
Total Posts: 300
09 Jan 2017 12:14 PM
In soybeans case just do

game.Players.LocalPlayer.Chatted:connect(msg,to)
blah blah blah
end)

instead


Report Abuse
storyofmlg is not online. storyofmlg
Joined: 10 Feb 2016
Total Posts: 41
10 Jan 2017 06:50 AM
What I would need exactly is a GUI named MysteryGUI to pop up when someone says "Mystery." Would I need to do anything like create a string value, or make any new files? If so, please let me know
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