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 » Scripting Helpers
Home Search
 

Script GUI (2)

Previous Thread :: Next Thread 
TopTroll is not online. TopTroll
Joined: 04 Jul 2011
Total Posts: 2645
14 May 2014 11:33 PM
Is there anyway to disable this localscript until the GUI is pressed? The weapon automatically shows up even though the GUI isn't pressed.

pic: imgur(dot)com/daBMohA
script: imgur(dot)com/P3az06Q
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
14 May 2014 11:37 PM
http://wiki.roblox.com/index.php?title=Function_Dump/Core_Functions#loadstring

EX;

v = Instance.new("StringValue",game.Lighting)
v.Name = "ScriptSource"
v.Value = [[

--Your Code in here

]]

--When needed
loadstring(game.Lighting:FindFirstChild("ScriptSource").Value)()
Report Abuse
Electrodacity is not online. Electrodacity
Joined: 07 Apr 2014
Total Posts: 225
14 May 2014 11:41 PM
Put this in a script that's parented under game.StarterGui["Class Selector"].Main["Angel Bow"] and call it Activate:

script.Parent.LocalScript.Disabled = true

sec = 100 -- put the delay between the start and stop of the script

script.Parent.MouseButton1Down:connect(function()
script.Parent.LocalScript.Disabled = false
wait(sec)
script.Parent.LocalScript.Disabled = true
end)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
14 May 2014 11:42 PM
^I thought that Disabled was a locked property of a script.
Report Abuse
Electrodacity is not online. Electrodacity
Joined: 07 Apr 2014
Total Posts: 225
14 May 2014 11:43 PM
It never was. lol
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
14 May 2014 11:43 PM
Oh, derp, haha use his @OP. Simpler, less lag.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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