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: Balls help please?

Previous Thread :: Next Thread 
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
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
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 05:53 PM
Bump...
Report Abuse
BluxBludScripter is not online. BluxBludScripter
Joined: 10 Jun 2012
Total Posts: 21
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
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 05:56 PM
DUDE YOU DIDN'T CHANGE A THING! XD.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 05:57 PM
God, I HATE when noobs get on these forums...
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
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
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
11 Jun 2012 06:01 PM
I think it's because 'balls' is filtered in-game.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 06:01 PM
Nope, didn't work either way.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
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
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
11 Jun 2012 06:04 PM
type(num) == "number"

You can't type a number, it'll always be a string.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
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 is not online. 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
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 06:19 PM
OH! XD, then how can I change it?
Report Abuse
pwnedu46 is not online. 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 is not online. 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
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
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
BluxBludScripter is not online. BluxBludScripter
Joined: 10 Jun 2012
Total Posts: 21
11 Jun 2012 07:18 PM
Just because I look like a noob, Doesn't mean I am One...
Report Abuse
BluxBludScripter is not online. BluxBludScripter
Joined: 10 Jun 2012
Total Posts: 21
11 Jun 2012 07:19 PM
And If you such a great scripter, Why are you asking for help...
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
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
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