|
| 26 Nov 2011 01:47 PM |
I just made an awesome script it is supposed to blow someone up when you say "explode/..." and I need help with it plz Here it is: game.Players.PlayerAdded:connect(function(diet) diet.Chatted:connect(function(msg) if string.sub(msg, 1, 8) == "explode/" then Noob = string.sub(msg, 8)) p = Instance.new("Explosion") p.Parent = game.workspace p.Position = game.Players.Noob.Head.Position p.BlastRadius = 20 p.BlastPressure = 80 end end end) |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 26 Nov 2011 01:50 PM |
p.Position = game.Players:FindFirstChild(Diet).Head.Position
|
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
|
| 26 Nov 2011 01:53 PM |
@Rofl Wouldn't the diet be the person who chatted the command. |
|
|
| Report Abuse |
|
|
FoolHater
|
  |
| Joined: 17 Jul 2008 |
| Total Posts: 2141 |
|
|
| 26 Nov 2011 03:05 PM |
Niobe is a string (simple words) not a player therefore it has no Head. 0_0
diet would be the player who chatted the message not the player you wanted to explode.
g=game.Players:GetChildren() for i = 1, #g do if g[i].Name ~= diet.Name then --you could change diet.Name to "dietcoke" pos = g[i]:GetCharacter --that method/function is probably wrong p.Position=pos.Head.Position end end
Someone correct my code and insert it into the young man's script. This chunk of code explodes all other players except for the player who chatted the message. |
|
|
| Report Abuse |
|
|
FoolHater
|
  |
| Joined: 17 Jul 2008 |
| Total Posts: 2141 |
|
|
| 26 Nov 2011 03:07 PM |
*noob not niobe
*could be :GetCharacter() |
|
|
| Report Abuse |
|
|