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: Help with script (EASY)

Previous Thread :: Next Thread 
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 10:24 AM
local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
local p = game.Lighting["bean"]:Clone()
p.Parent = game.Players.LocalPlayer.Backpack
end)

i want it so when you click it it gives you a gear.
Report Abuse
MKofOrbiter is not online. MKofOrbiter
Joined: 28 Aug 2010
Total Posts: 910
11 Jul 2015 10:33 AM
local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
local p = game.Lighting.bean:Clone() -- You Don't need "[]"
p.Parent = plr.Backpack
end)

-- Want to know how to script well you need too jflji1wre231;kjfdq
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 10:37 AM
doesn't work
Report Abuse
hurriedsonic123456 is not online. hurriedsonic123456
Joined: 20 Feb 2011
Total Posts: 198
11 Jul 2015 11:16 AM
try this

local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
game.Lighting["bean"]:Clone().Parent = game.Players.LocalPlayer.Backpack
end)
Report Abuse
Gogeta is not online. Gogeta
Joined: 25 Nov 2006
Total Posts: 583
11 Jul 2015 11:21 AM
Okay stop right there guys. You're missing this.

local plr = game.Players.LocalPlayer
function onButtonClicked()
game.Lighting:FindFirstChild("bean"):Clone().Parent = plr.Backpack
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
hurriedsonic123456 is not online. hurriedsonic123456
Joined: 20 Feb 2011
Total Posts: 198
11 Jul 2015 11:22 AM
woops wrong one XD

local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
game.Lighting.bean:Clone().Parent = game.Players.LocalPlayer.Backpack
end)
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 11:25 AM
none of them work
Report Abuse
Gogeta is not online. Gogeta
Joined: 25 Nov 2006
Total Posts: 583
11 Jul 2015 11:26 AM
I advise you if you're making multiple buttons to use one script.

plr = game.Players.LocalPlayer
console = script.Parent --the Screen Gui
button = console.button -- The name of the specific text button. The class has to be text button.

function onButtonClicked()

game.Lighting:FindFirstChild("bean"):Clone().Parent = plr.Backpack
end
button.MouseButton1Click:connect(onButtonClicked)
Report Abuse
Gogeta is not online. Gogeta
Joined: 25 Nov 2006
Total Posts: 583
11 Jul 2015 11:27 AM
Also the way i told you to do this works unless you're doing something wrong. So figure it out.
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 12:46 PM
It's a surface gui with a button and that doesn't work
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Jul 2015 12:47 PM
Make sure it is in PlayerGui, not Workspace.
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 12:49 PM
It'S A SURFACE GUI NOT A GUI
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Jul 2015 01:03 PM
I CAN USE CAPS TOO :D

Again, MAKE SURE it is in PlayerGui, NOT Workspace.
LocalScripts DO NOT WORK in Workspace.
LocalPlayer DOES NOT WORK in Scripts.

Put it in PlayerGui, and SET THE ADORNEE!
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 01:05 PM
YOU CAN"T PUT IT IN PLAYERGUI IT'S A BRICK
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
11 Jul 2015 01:08 PM
gdfgd
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