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: Script not working..

Previous Thread :: Next Thread 
deathdoor95 is not online. deathdoor95
Joined: 19 Feb 2010
Total Posts: 2080
09 Apr 2014 09:28 PM
script.Parent.MouseButton1Click:connect(function()
p = script.Parent.Parent.Parent.Parent.Parent.Parent
pn = p.Name
wp = game.Workspace:findFirstChild(pn)

if script.Parent.Text == ("[Sword]") then
script.Parent.Visible=false
for i = 1,#players do
game.Lighting.Sword:clone().Parent = p.Backpack
end
end
end)
Report Abuse
deathdoor95 is not online. deathdoor95
Joined: 19 Feb 2010
Total Posts: 2080
09 Apr 2014 09:32 PM
The button dissappears, but the sword doesn't enter my backpack.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
09 Apr 2014 09:34 PM
Make sure this is in a local script and Sword is a tool in lighting.

script.Parent.MouseButton1Click:connect(function()
if script.Parent.Text == ("[Sword]") then
script.Parent.Visible = false
game.Lighting.Sword:Clone().Parent = game.Players.LocalPlayer.Backpack
end
end)
Report Abuse
deathdoor95 is not online. deathdoor95
Joined: 19 Feb 2010
Total Posts: 2080
09 Apr 2014 09:35 PM
It's supposed to go into every player in the game's backpack. Hence the 'for i = 1,#players'
Report Abuse
deathdoor95 is not online. deathdoor95
Joined: 19 Feb 2010
Total Posts: 2080
09 Apr 2014 09:39 PM
Bump
Report Abuse
deathdoor95 is not online. deathdoor95
Joined: 19 Feb 2010
Total Posts: 2080
09 Apr 2014 09:47 PM
I fixed it.
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