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
 

What's wrong with this GUI script?

Previous Thread :: Next Thread 
datdude3 is not online. datdude3
Joined: 23 Apr 2010
Total Posts: 577
22 Feb 2014 11:37 AM
I'm using it so if you click the GUI it gives you a weapon from lighting.

game.Workspace.Players.PlayerAdded:connect(function(player)

end)

Lighting = game.GetService("Lighting")
function onClicked()
if onClicked then
game.Workspace.Lighting.Dagger:clone() = game.Workspace.player.Backpack
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
truefire2 is not online. truefire2
Joined: 04 Jul 2010
Total Posts: 5330
22 Feb 2014 11:40 AM
What is the playeradded function for?
You've done the structure wrong.

Lighting = game.Lighting

script.Parent.MouseButton1Down:connect(function() -- Anonymous function
Lighting.Dagger:Clone().Parent = game.Players.LocalPlayer.Backpack -- Clones a dagger from the game lighting into player backpack.
end)
Report Abuse
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
22 Feb 2014 11:40 AM
game.Workspace.Lighting.Dagger:clone().Parent = game.Workspace.player.Backpack
Report Abuse
datdude3 is not online. datdude3
Joined: 23 Apr 2010
Total Posts: 577
22 Feb 2014 11:42 AM
Thank you guys so much! I really need help on my scripting xD
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