|
| 04 Jan 2014 07:51 AM |
g = game.Players:GetChildren() local Sword = game.Lighting.LinkedSword
admin = {"rosie92680"} game.Players.PlayerAdded:connect(function(nP) for _,v in pairs(admin) do if nP.Name == v then nP.Chatted:connect(function(msg) if msg == "Computer load Swordfight" then x = game.Lighting.Swordfight:Clone()
for i = 1, #g do local SwordCopy = Sword:Clone() SwordCopy.Parent = g[i].Backpack end --ends the for function
M = Instance.new("Message") M.Parent = game.Workspace wait(0.1) M.Text = "E" wait(0.1) M.Text = "EC" |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Jan 2014 08:04 AM |
| Do you need me to post the full script? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 08:17 AM |
| Are there any errors in the output? |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 04 Jan 2014 08:19 AM |
What seems to be the issue? (What's not happening/what's broken/output)
Also, what are you doing with 'x'? (x = game.Lighting.Swordfight:Clone()) Is this the issue? You haven't given x a parent. |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 04 Jan 2014 09:26 AM |
Use game.Players:GetPlayers() not game.Players:GetChildren()
That could be one issue.. it's also more efficent. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 09:28 AM |
Well, it is loading the place, there are no errors in the output, it just isn't giving the players the swords.
I will try getplayers() instead, and see if that works. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 09:31 AM |
getplayers change anything.
Also x is moving the place from lighting to workspace, so that is fine. |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 04 Jan 2014 09:33 AM |
| Try putting g = game.Players:GetPlayers() inside the Chatted function. |
|
|
| Report Abuse |
|
|
| |
|