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: Scripting help please! (GUI APPEARING WHEN TOOL IS EQUIPED)

Previous Thread :: Next Thread 
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:14 AM
Hello, My name is Melvin and I am working on a game. I wonder if someone know how to make a gui appear when a tool is equiped. It means I want a gui inside a tool if that is possible. If you know how to please leave a comment!
Report Abuse
Firehoaxx is not online. Firehoaxx
Joined: 24 Dec 2015
Total Posts: 950
13 Oct 2017 10:18 AM
LocalScript in tool:
script.Parent.Equipped:Connect(function()

gui.Visible = not gui.Visible
end)


--Random sequence of numbers
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:20 AM
Okay, Should I add the gui inside the script?
Report Abuse
Firehoaxx is not online. Firehoaxx
Joined: 24 Dec 2015
Total Posts: 950
13 Oct 2017 10:24 AM
No, you put the gui into startergui, above the script type in
local gui = game.Players.LocalPlayer.PlayerGui.YOURGUINAME


--Random sequence of numbers
Report Abuse
Firehoaxx is not online. Firehoaxx
Joined: 24 Dec 2015
Total Posts: 950
13 Oct 2017 10:28 AM
**replace Visible with Enabled In the first part


--Random sequence of numbers
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:31 AM
Is not working. );
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:32 AM
You have to clarify what gui is so the script can enable it's visibility property...
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:35 AM
How?
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:37 AM
at the very top of the script, do



'local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").ScreenGui -- change "ScreenGui" to whatever you named your Gui'
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:42 AM
So its this okay?

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").ScreenGui -- change "ScreenGui" to whatever you named your Gui
local gui = game.Players.LocalPlayer.PlayerGui.GuiFood

script.Parent.Equipped:Connect(function()

gui.Enabled = not gui.Enabled
end)
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:43 AM
nop. I'll just type out the script for you




local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()
gui.Enabled = true
end)



~ workspace.GeneratedScript.Life:Remove()
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:44 AM
Oh wait I found the problem I think it will works now.
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:45 AM
Nvm. Still not working.
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:47 AM
Paste the entire script here. I'll repost the fixed version
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:49 AM
local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

local gui = game.Players.LocalPlayer.PlayerGui.GuiFood

script.Parent.Equipped:Connect(function()

gui.Enabled = not gui.Enabled

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()
gui.Enabled = true
end)



~ workspace.GeneratedScript.Life:Remove()

end)
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:50 AM
LOL. THAT'S WHAT I WAS WORRIED ABOUT! REMOVE THE;

~workspace.GeneratedScript.Life:Remove()


THAT'S MY SIGGY LMAOOO

Here's the fixed up;


--Delete your entire script, and paste this into an empty localscript inside the tool

ocal gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()

gui.Enabled = not gui.Enabled

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()
gui.Enabled = true
end)




end)
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:52 AM
Oops. I added an extra end).




--Delete your entire script, and paste this into an empty localscript inside the tool

ocal gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()

gui.Enabled = not gui.Enabled

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()
gui.Enabled = true
end)
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 10:53 AM
Wheres should the gui be?
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:53 AM
I should just go die. I made a misspelling...


--Delete your entire script, and paste this into an empty localscript inside the tool

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()

gui.Enabled = not gui.Enabled

local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui").GuiFood

script.Parent.Equipped:Connect(function()
gui.Enabled = true
end)
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 10:55 AM
gui should be inside of StarterGui.
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 11:00 AM
Still not working... Should the gui be enabled in studio?
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 11:06 AM
?
Report Abuse
GeneratedScript is online. GeneratedScript
Joined: 16 Jun 2017
Total Posts: 115
13 Oct 2017 11:11 AM
no
Report Abuse
Melvincoolhjorten is not online. Melvincoolhjorten
Joined: 01 Feb 2016
Total Posts: 43
13 Oct 2017 11:23 AM
I give up.
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