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
 

Moving Parts

Previous Thread :: Next Thread 
roeypeleg36 is not online. roeypeleg36
Joined: 02 Jun 2012
Total Posts: 1002
20 Aug 2014 04:03 AM
Im trying to make a part move, here is the script:
function move
a=(a+1)
b=(b+1)
c=(c+1)
game.Workspace.Part.Position= a,b,c
end
a=-68.795
b=0.59
c=78.542
game.Workspace.Part.Position= a,b,c
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move
wait(1)
move

This is what it says in output:Workspace.Moving Part.Script:6: unexpected symbol near '=

Can someone help me? I cant fix it. Also, I am just a beginner, so this is hard...
Thanks!
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
20 Aug 2014 04:20 AM
a=-68.795
b=0.59
c=78.542

function move()
a=(a+1)
b=(b+1)
c=(c+1)
game.Workspace.Part.Position= Vector3.new(a,b,c)
end

game.Workspace.Part.Position= Vector3.new(a,b,c)
wait(1)
move()

This might help you understand functions
http://wiki.roblox.com/index.php?title=Function
Report Abuse
roeypeleg36 is not online. roeypeleg36
Joined: 02 Jun 2012
Total Posts: 1002
21 Aug 2014 10:00 AM
Thanks, it worked!
Report Abuse
TheMrRadioActiveMan is not online. TheMrRadioActiveMan
Joined: 11 Dec 2010
Total Posts: 974
21 Aug 2014 10:39 AM
you need to use CFrame Vector3 works and is easier but CFrame is better

http://wiki.roblox.com/index.php?title=CFrame
Report Abuse
roeypeleg36 is not online. roeypeleg36
Joined: 02 Jun 2012
Total Posts: 1002
23 Aug 2014 02:57 AM
Ok
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
23 Aug 2014 04:11 AM
What makes CFrames better in this case?
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
23 Aug 2014 04:25 AM
if u use position, the object will just move on top of any object that may be in the way of the target. if u use CFrame, the object will be moved inside of any objects that may be in the way.
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
23 Aug 2014 04:28 AM
Whoa, I didn't know position did collision checking. That's good to know.
Report Abuse
TheMrRadioActiveMan is not online. TheMrRadioActiveMan
Joined: 11 Dec 2010
Total Posts: 974
23 Aug 2014 05:38 PM
what he said lol
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Aug 2014 05:39 PM
I hate when people say CFrame is better than Vector3.
A Vector3 is derived from CFrame, it's like saying an engine is better than a car (a car that has an engine, of course).
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Aug 2014 05:40 PM
A car is better than an engine* but you get the point.

The way roblox handles the collision detection is not due to Vector3 but due to the Position and Rotation properties (which is MEANT for collision-detection)
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