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: Meteor generator problem

Previous Thread :: Next Thread 
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 06:22 AM
This is Stickmasterluke's cloud generator script, altered a little to be an orbiting meteor generator, and it has failed to work "performing arithmetic on local speed (A string value)"

I was wondering if you guys had any idea how to fix this, I'll post the output I received below, as well as the script section as the post doesn't seem to work with the whole script.

Output:

12:05:00.628 - Workspace.CloudScript:76: attempt to perform arithmetic on local 'speed' (a string value)

Script section:


v.CFrame=v.CFrame+Vector3.new(0,0,-speed*rate) -- This is line 76 with the problem
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
06 Aug 2013 06:46 AM
....Have you tried tonumbering it?

tonumber(speed)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
06 Aug 2013 06:47 AM
Actually no. The problem is that speed is a string that is not just numbers.

print speed and tell us please.
Report Abuse
SmoothBlockModel is online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
06 Aug 2013 06:59 AM
put a print(speed) before that line and tell us what output is
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 07:01 AM
You may view the script here, it is unedited apart from the MeshID, texture ID and size. http://www.roblox.com/Clouds-Script-item?id=116515736
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 07:03 AM
Nothing seems to be coming up so far, apart from the
13:02:40.818 - Workspace.CloudScript:77: attempt to perform arithmetic on local 'speed' (a string value)
13:02:40.818 - Script "Workspace.CloudScript", Line 77
13:02:40.819 - stack end
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 07:14 AM
Got any ideas?
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 08:44 AM
Was this broken by a Roblox update?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
06 Aug 2013 09:10 AM
Post the entire script, or more of the section? (specifically what speed is)
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 10:50 AM
It wont post for some reason! Unexpected error with your request
Please try again after a few moments.
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 10:50 AM
But it never works, even after a few moments and hours....
Report Abuse
Xtreme101 is not online. Xtreme101
Joined: 03 Jan 2009
Total Posts: 4385
06 Aug 2013 10:52 AM
Put print(speed) BEFORE the error.
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 10:55 AM
tonumber(speed:gsub('%D',''))

thats if ur lazy and dont wanna fix the source

omg hi diddle111 you dont know me but i know you c:
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 11:01 AM
for i,v in pairs(gc) do
local speed=string.sub(v.Name,11)--this is a string :c...
if tonumber(speed)then
v.CFrame=v.CFrame+Vector3.new(0,0,-tonumber(speed)*rate)
if v.Position.z (SMALLERTHAN) limits[1].z then
v.Transparency=v.Transparency+(rate/3)
if v.Transparency (LARGERTHAN) 1 then
v:remove()
end
end




pretty simple, one of the names of your meteors/clouds isn't a number, either that or you need the tonumber function. this'll stop errors
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 11:01 AM
I put print(speed) before the error and nothing happened, use the link above to find the script as I said, as I am incapable of pasting it here.
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 11:01 AM
replace SMALLERTHAN and LARGERTHAN, i had to get rid of them because forums think it means a link so it doesn't let you post :(
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 11:02 AM
Thanks for the help, can you incorperate that into this? http://www.roblox.com/Clouds-Script-item?id=116515736
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 11:05 AM
that was to replace lines 74-81

but here :L

http://www.roblox.com/afdsdasfa-item?id=125465100
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 11:11 AM
Zomg you're the best, does it work? :o
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 11:13 AM
This is what I got
17:13:24.451 - Transparency is not a valid member of Script
17:13:24.452 - Script "Workspace.CloudScript", Line 84
17:13:24.452 - stack end
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 12:12 PM
Bump
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
06 Aug 2013 12:22 PM
Ill help, but i need to see the script :c

Im on ipad so i cant take a look at the source qq


Post it on sync or sumtin
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 12:44 PM
http://www.roblox.com/afdsdasfa-item?id=125465100
Report Abuse
Diddleshot is not online. Diddleshot
Joined: 13 May 2008
Total Posts: 676
06 Aug 2013 12:44 PM
Hmm, maybe when you get to a computer?
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
06 Aug 2013 12:47 PM
hurdurhur nop i cant


Post eet on

sync
.
in/rainbows
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