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: HELP ME PLZ!!

Previous Thread :: Next Thread 
dietcoke101 is not online. dietcoke101
Joined: 13 Mar 2010
Total Posts: 296
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 is not online. 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 is not online. 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 is not online. 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 is not online. FoolHater
Joined: 17 Jul 2008
Total Posts: 2141
26 Nov 2011 03:07 PM
*noob not niobe

*could be :GetCharacter()
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