|
| 08 Jul 2014 08:19 AM |
| Whats the command to clone something from lighting into the players backpack? |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2014 08:21 AM |
Clone = ClonePathHere:Clone() Clone.Parent = Player.Backpack |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 08 Jul 2014 08:30 AM |
| There's the problem, you used "Player" instead of "player". |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 08 Jul 2014 08:33 AM |
| player.Backpack.LinkedSword:Remove() |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
|
| 08 Jul 2014 09:28 AM |
| "if player.Name == "18lpickett" then" |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 08 Jul 2014 09:33 AM |
| Yes, make it outside of that if statement's scope. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 08 Jul 2014 09:47 AM |
| No, you'll have to restructure the script. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|