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: What am I doing wrong D:

Previous Thread :: Next Thread 
AcceptedBusiness is not online. AcceptedBusiness
Joined: 24 Sep 2011
Total Posts: 526
11 Nov 2012 10:54 AM
while true do

for i = 1,100 do
v = script.Parent
v.CFrame = v.CFrame+Vector3.new(0.5,0,0)
wait()

end
v.Position = v.Position(-148, 1.6, -55) -- Problem here
end


I want the brick this is in to move for a bit, then return to the original position. I haven't scripted lua in like 2 years so this is probably totally wrong ^^
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
11 Nov 2012 10:55 AM
v.Position = Vector3.new(-148, 1.6, -55)

is this what you meant?
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
11 Nov 2012 10:56 AM
    v = script.Parent
    while true do
      for i = 1, 100 do
        v.CFrame = v.CFrame + Vector3.new(.5,0,0)
        wait()
      end
      v.Position = Vector3.new(-148, 1.6, -55)
    end
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
11 Nov 2012 10:56 AM
.. Why do you have a loop in a loop? delete either the i = or while true do..
plus the didn't equal anything at the end so it wouldn't have looped..
Report Abuse
AcceptedBusiness is not online. AcceptedBusiness
Joined: 24 Sep 2011
Total Posts: 526
11 Nov 2012 10:57 AM
Thanks guys. So essentially Vector3 controls all positioning?
Report Abuse
reflicted is not online. reflicted
Joined: 07 Nov 2012
Total Posts: 265
11 Nov 2012 10:59 AM
Yes.
Report Abuse
AcceptedBusiness is not online. AcceptedBusiness
Joined: 24 Sep 2011
Total Posts: 526
11 Nov 2012 11:01 AM
Thinks a bunch man. Finally my game will take shape :)
Report Abuse
reflicted is not online. reflicted
Joined: 07 Nov 2012
Total Posts: 265
11 Nov 2012 11:28 AM
Hold on, forget to say something (stupid iPad)

Vector3 is used for Position, Size, and something else.
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