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 to merge 2 localscripts together???! (combine the code)

Previous Thread :: Next Thread 
sayer80 is not online. sayer80
Joined: 19 Jun 2014
Total Posts: 16
25 Sep 2017 10:12 AM
LocalScript:

script.Parent.MouseButton1Click:connect(function()
local startergui = game:GetService("StarterGui")
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
script.Parent.LocalScript2.Disabled = false
script.Disabled = true
end)


LocalScript2:

script.Parent.MouseButton1Click:connect(function()
local startergui = game:GetService("StarterGui")
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
script.Parent.LocalScript.Disabled = false
script.Disabled = true
end)

How to make those 2 Chat disabler / enabler functions into one Script!?!
Report Abuse
PossibIy is online. PossibIy
Joined: 27 Mar 2014
Total Posts: 214
25 Sep 2017 10:16 AM
Uh, those are the exact same... Are you trolling?


#code print('Success')
Report Abuse
sayer80 is not online. sayer80
Joined: 19 Jun 2014
Total Posts: 16
25 Sep 2017 10:18 AM
NO at local script 2 it says
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true) the true
script.Parent.LocalScript.Disabled = false no "2"

at first local script it says
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false) the false
script.Parent.LocalScript2.Disabled = false "nothing"

Report Abuse
WillieTehWierdo200 is not online. WillieTehWierdo200
Joined: 13 Aug 2008
Total Posts: 1147
25 Sep 2017 10:30 AM
Can you show us where these scripts are in your Explorer tree?
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
25 Sep 2017 10:33 AM
local enabled = false
local startergui = game:GetService("StarterGui")

script.Parent.MouseButton1Click:Connect(function()

startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, enabled)
enabled = not enabled

end)
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