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: Commands don't work. Why?

Previous Thread :: Next Thread 
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 02:45 PM
These two commands don't work. Could anyone tell me why?

if string.sub(msg,1,5) == "fire/" then
local player = findplayer(string.sub(msg,10),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Head")
if torso ~= nil then
local fire = Instance.new("Fire")
fire.Color = Color3.new(255, 127, 0)
fire.SecondaryColor = Color3.new(255, 0, 0)
fire.Heat = 13
fire.Size = 3
fire.Parent = torso
end end end end end

if string.sub(msg,1,7) == "unfire/" then
local player = findplayer(string.sub(msg,12),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Head")
if torso ~= nil then
local c = torso:GetChildren()
for i2 = 1,#c do
if c[i2].className == "Fire" then
c[i2]:remove()
end end end end end end end

Is it in line two of the first where it says "(string.sub(msg,10),speaker)"? Should it be "(string.sub(msg,6),speaker)"? And the same idea in the second command?
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
29 Jul 2011 02:50 PM
Is this the full script?
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
29 Jul 2011 02:50 PM

First of all dont double post I solved your first problem. Your second I thaught youd figure out on your own... But I guess that shows that your just a free model place builder.

Look at this,
local player = findplayer(string.sub(msg,12),speaker)
focus on the part that says (msg,12)
Now look at the 12, and look at your 7. What do you see?
Report Abuse
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 02:54 PM
So it should be a 7.
Report Abuse
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 02:55 PM
I thought it was supposed to be an 8.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
29 Jul 2011 02:56 PM
*FacePalm*

Do you expect the person typing to post

'/' and a diffrent character like 'b' overtop each other?
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
29 Jul 2011 02:57 PM
YES IT IS SUPPSOED TO BE 8! If you thaught it was then you shouldve done it.
Report Abuse
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 03:01 PM
Kkkkkkk.... Sorry Mr. Expert.
Report Abuse
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 03:01 PM
So in the first one it should be a 6. Kk.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
29 Jul 2011 03:02 PM
Look dude next time dont double post. Its irratating.
Report Abuse
Kikiosu is not online. Kikiosu
Joined: 24 Nov 2009
Total Posts: 39
29 Jul 2011 03:04 PM
Ima sorry. I will spank myself now. *smack* Ow my face!
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