|
| 14 May 2012 02:33 PM |
function onChatted(message,player) if message:sub(1, 5) == "!kill" then game.Players.Player.Character.Humanoid.MaxHealth = 0 end player.Chatted:connect(function(message) onChatted(message, player) end) end)
I was expecting for all the players to get killed but no one did. Please help. |
|
|
| Report Abuse |
|
|
|
| 14 May 2012 02:38 PM |
Try:
Game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "!kill" then for i, v in pairs(Game.Players:GetPlayers()) do if v.Character then v.Character:BreakJoints() end end end end) end)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 14 May 2012 02:40 PM |
| ok ok :3 Then how do I insert a backpack into all the players |
|
|
| Report Abuse |
|
|
|
| 14 May 2012 02:45 PM |
Uh...
for _, b in pairs(Game.Players:GetPlayers()) do Instance.new("Backpack", b) end
???
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 14 May 2012 02:50 PM |
Try:
Game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "LinkedSword" then for i, v in pairs(Game.Players:GetPlayers()) do if v.Character then Instance.new("Backpack", v).Name = "Backpack2" Game.Lighting:FindFirstChild("LinkedSword"):Clone().Parent = v.Backpack2 end end end end) end)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 14 May 2012 03:08 PM |
Okay, here's to not over-complicating things.
Game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "linked on" then for i, v in pairs(Game.Players:GetPlayers()) do Game.Lighting:FindFirstChild("LinkedSword"):Clone().Parent = v.StarterGear end elseif msg == "linked off" then for i, v in pairs(Game.Players:GetPlayers()) do v.StarterGear:FindFirstChild("LinkedSword"):Destroy() end end end end) end)
Do the same for the gun.
† KMXD † |
|
|
| Report Abuse |
|
|