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 » Scripters
Home Search
 

Re: 'for' initial value must be a number

Previous Thread :: Next Thread 
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
08 Jul 2015 08:52 PM
How can I bypass the initial value having to be a number.
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
08 Jul 2015 08:52 PM
Explain more
Report Abuse
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
08 Jul 2015 08:54 PM
for i = pos, p do
part.CFrame = CFrame.new(i, Vector3.new(p.x,pos.y,p.z))
end
says initial value must be a number? I dont know how to explain more.
Report Abuse
igunaa is online. igunaa
Joined: 15 Sep 2010
Total Posts: 2588
08 Jul 2015 08:59 PM
For loops work as

for 1,10 do
-- code here
wait(1)
end

It`ll execute the code 10 times in 10seconds.

Now you might me asking this, to make actual CFrame moviment


for i=1, 100 do
door1.CFrame = door1.CFrame * CFrame.new(-0.1,0,0)
wait()
end

Said the wise.
Report Abuse
Gladii is not online. Gladii
Joined: 10 Mar 2012
Total Posts: 1713
08 Jul 2015 09:01 PM
But the initial value is variable. I can't change that. it's apart of my game.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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