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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

There is no output and it's not working?

Previous Thread :: Next Thread 
mickymack is not online. mickymack
Joined: 27 Jul 2008
Total Posts: 19
08 Jan 2012 02:40 PM
I see no problem.

UserName = "mickymack"
C = "/"
Admin = game:service("Players"):findFirstChild(UserName)

function onChat(msg)
if string.sub(msg, 1, 7 + #C) == "explode"..C then
m = string.lower(msg, 8 + #C)
z = game:service("Players"):children()
for x = 1, #z do
if string.find(string.lower(z[x].Name), string.sub(m, 8)) == 1 then
if z[x] ~= nil then
E = Instance.new("Explosion")
E.Parent = z[x].Character.Torso
E.BlastPressure = 20
E.BlastRadius = 5
E.Position = z[x].Character.Torso.Position
end
end
end
end
if string.sub(msg, 1, 6 + #C) == "freeze"..C then
m = string.lower(msg, 7 + #C)
z = game:service("Players"):children()
for x = 1, #z do
if string.find(string.lower(z[x].Name), string.sub(m, 7)) == 1 then
if z[x] ~= nil then
char = z[x].Character:children()
for c = 1, #char do
if char[c]:IsA("BasePart") then
char[c].Anchored = true
end
end
end
end
end
end
if string.sub(msg, 1, 4 + #C) == "thaw"..C then
m = string.lower(msg, 5 + #C)
z = game:service("Players"):children()
for x = 1, #z do
if string.find(string.lower(z[x].Name), string.sub(m, 5)) == 1 then
if z[x] ~= nil then
char = z[x].Character:children()
for c = 1, #char do
if char[c]:IsA("BasePart") then
char[c].Anchored = false
end
end
end
end
end
end
if string.sub(msg, 1, 2 + #C) == "ff"..C then
m = string.lower(msg, 3 + #C)
z = game:service("Players"):children()
for x = 1, #z do
if string.find(string.lower(z[x].Name), string.sub(m, 3)) == 1 then
if z[x] ~= nil then
ff = Instance.new("ForceField")
ff.Parent = z[x].Character
end
end
end
end
end

Admin.Chatted:connect(onChat)
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