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: How

Previous Thread :: Next Thread 
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 08:19 AM
Whats the command to clone something from lighting into the players backpack?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 08:21 AM
Clone = ClonePathHere:Clone()
Clone.Parent = Player.Backpack
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 08:23 AM
So i have a holo and i want it to where when you say load/sf the map (works) and the sword load on your player. This isnt workin..why?

game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = Player.Backpack
end
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end)
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 08:27 AM
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = Player.Backpack
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end
end)
end)
Could you explain in detail what the problem is exactly?.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 08:29 AM
When i say load/sf the map from lighting loads but the sword doesnt. I checked the output and it says Player is a nil value
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 08:30 AM
There's the problem, you used "Player" instead of "player".
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 08:32 AM
lol thank u and also is there any way when i say end/sf that i can get the tool removed?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 08:33 AM
player.Backpack.LinkedSword:Remove()
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 08:40 AM
ty a whole lot anom :D
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 09:27 AM
So i tried it out with this other guy and when i said load/sf or load/gft it did it for me but not him. Why?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 09:28 AM
"if player.Name == "18lpickett" then"
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 09:30 AM
so is there any way i can make it to where it gives all the players the sword but only i can say the command?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 09:33 AM
Yes, make it outside of that if statement's scope.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 09:37 AM
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
end
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = Player.Backpack
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end)
end)
Would this work?
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 09:45 AM
B1
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 09:47 AM
No, you'll have to restructure the script.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
08 Jul 2014 09:49 AM
game.Players.ChildAdded:connect(function(player)
for _,v in pairs(game.Players:GetPlayers()) do
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = v.Backpack
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end
end)
end
end)
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 10:06 AM
It loaded the map and gave me the sword but i could only load it once and it only gave the sword to me.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 10:12 AM
B2
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 10:19 AM
B3
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 11:09 AM
B4
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 11:29 AM
B5
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
08 Jul 2014 12:02 PM
B7
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