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
 

Re: When you click a gui

Previous Thread :: Next Thread 
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 01:59 PM
When you click a gui it is supposed to give you a sword.. I have no errors... THis is the script (It is inside textbutton which is inside screenGUI which is inside starter GUI)

script.Parent.MouseButton1Click:connect(function()
wait(0.1)
script.Parent.Parent.Parent = nil
wait(0.1)
game.Lighting.LinkedSword:Clone()
wait(0.1)
game.Lighting.LinkedSword.Parent = game.Players.LocalPlayer.Backpack
end)


Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
24 Nov 2013 02:01 PM
script.Parent.Parent.Parent = nil

.....The script is inside that...So the script is no longer running...

Also:
game.Lighting.LinkedSword:Clone().Parent = game.Players.LocalPlayer.Backpack
Report Abuse
TheEliteDonphan is not online. TheEliteDonphan
Joined: 16 Jun 2013
Total Posts: 2647
24 Nov 2013 02:04 PM
[ Content Deleted ]
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 02:11 PM
Fixed it

script.Parent.MouseButton1Click:connect(function()
wait(0.1)
script.Parent.Parent.Parent = nil
wait(0.1)
game.Lighting.LinkedSword:Clone()
wait(0.1)
game.Lighting.LinkedSword:Clone().Parent=game.Players.LocalPlayer.Backpack
end)
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 02:14 PM
Nvm.. I broke it somehow... qq
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 02:15 PM
It works on Play Solo but not when I run the server and test player
Report Abuse
TheEliteDonphan is not online. TheEliteDonphan
Joined: 16 Jun 2013
Total Posts: 2647
24 Nov 2013 02:22 PM
[ Content Deleted ]
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 02:28 PM
Okay.. I have no idea what that means and how to fix it... qq
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
24 Nov 2013 02:33 PM
You are doing the cloning wrong...I posted that already...
Report Abuse
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
24 Nov 2013 02:37 PM
It has to be a localscript.
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
24 Nov 2013 02:38 PM
I don't know why you would need all the waits because I'm pretty sure the player's backpack would already be loaded if they can see the GUI.

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent:Remove()
game.Lighting.LinkedSword:Clone().Parent = game.Players.LocalPlayer.Backpack
end)
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
24 Nov 2013 02:49 PM
I did the change for the clone thing.. The thing worked in Solo..
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