|
| 11 Jun 2012 05:50 PM |
XD I know the title sounds weird, but here(I tried this, but it didn't work):
Here's the command(without the extra crap...):
if msg:sub(1,6) == "balls/" then num = msg:sub(7) if type(num) == "number" then p = Instance.new("Part",game.Workspace) p.Shape = "Ball" p.Position = game.Workspace.flappydavid.Head.Position tonumber(num) for i = 1,num do p:clone().Parent = game.Workspace end end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Jun 2012 05:55 PM |
if msg:sub(1,6) == "balls/" then num = msg:sub(7) if type(num) == "number" then p = Instance.new("Part",game.Workspace) p.Shape = "Ball" p.Position = game.Workspace.flappydavid.Head tonumber(num) for i = 1,num do p:clone().Parent = game.Workspace end end end |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 05:56 PM |
| DUDE YOU DIDN'T CHANGE A THING! XD. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 05:57 PM |
| God, I HATE when noobs get on these forums... |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 05:59 PM |
| Oh, the only think you changed was the Position, that line I'm pretty sure is right, but I'll give it a shot... XD. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:01 PM |
| I think it's because 'balls' is filtered in-game. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:01 PM |
| Nope, didn't work either way. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:03 PM |
if msg:sub(1,2) == "b/" then num = msg:sub(3) if type(num) == "number" then p = Instance.new("Part",game.Workspace) p.Shape = "Ball" p.Position = game.Workspace.flappydavid.Head.Position tonumber(num) for i = 1,num do p:clone().Parent = game.Workspace end end end
Did that... |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:04 PM |
type(num) == "number"
You can't type a number, it'll always be a string. |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:18 PM |
| No! I mean't if type(num) == "number" then... Like it's type is a number. |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 11 Jun 2012 06:19 PM |
You could try using tostring on the message to get the number.
---------- ~pwnedu46, wiki writer~ |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:19 PM |
| OH! XD, then how can I change it? |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 11 Jun 2012 06:20 PM |
@flappy: We know. Anything entered in chat is a string. Like I said, you can try using tonumber.
---------- ~pwnedu46, wiki writer~ |
|
|
| Report Abuse |
|
|
malachi11
|
  |
| Joined: 07 May 2008 |
| Total Posts: 2420 |
|
|
| 11 Jun 2012 06:23 PM |
if msg:sub(1,6) == "balls/" then num = msg:sub(7) num=tonumber(num) if num then num=math.abs(num) p = Instance.new("Part",game.Workspace) p.Shape = "Ball" p.Position = game.Workspace.flappydavid.Head.Position for i = 1,num do p:clone().Parent = game.Workspace end end end
That should work.
:P |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 06:25 PM |
if msg:sub(1,6) == "balls/" then n = msg:sub(7) if not not tonumber(n) then local num = tonumber(n) p = Instance.new("Part",game.Workspace) p.Shape = "Ball" p.Position = game.Workspace.flappydavid.Head.Position for i = 1,num do p:clone().Parent = game.Workspace end end end
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 07:18 PM |
| Just because I look like a noob, Doesn't mean I am One... |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 07:19 PM |
| And If you such a great scripter, Why are you asking for help... |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2012 10:19 PM |
| Even the best scripters(in which I'm not) ask for help. Blux, for saying that. I got kind of annoyed. |
|
|
| Report Abuse |
|
|