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: This moving it forward?

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 01:33 PM
while wait()
game.Workspace.Model:SetPrimaryPartCFrame(game.Workspace.Model.PrimaryPart.CFrame * game.Workspace.Model.PrimaryPart.CFrame.lookVector * 1)
end


Will that move it forward every wait()? Like forward 1 stud? So it smoothly moves forward? or?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Dec 2014 01:41 PM
You forgot "do", but I'm not sure about the rest. I can't solve CFrames unless I am the one that makes it. And then I can only solve problems or understand my own if I see it within the same week.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 01:44 PM
Yeah I just copypasted and I accidentaly removed do...but the CFrame is what I wonder.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 01:46 PM
20:47:08.966 - Unable to cast Vector3 to CoordinateFrame


Output.
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
23 Dec 2014 01:48 PM
game.Workspace.Model.PrimaryPart = game.Workspace.Model.Part
while wait() do
game.Workspace.Model:SetPrimaryPartCFrame(game.Workspace.Model.PrimaryPart.CFrame * CFrame.new(0,0,-1))
end



lookVector is a Vector3
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 01:53 PM
It needs to move to the way the part is facing, so isn't that wrong?
Report Abuse
Funse is not online. Funse
Joined: 11 Jun 2012
Total Posts: 7887
23 Dec 2014 01:55 PM
game.Workspace.Model:SetPrimaryPartCFrame(game.Workspace.Model.PrimaryPart.CFrame * game.Workspace.Model.PrimaryPart.lookVector * 1)
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 01:57 PM
^ no
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
23 Dec 2014 02:04 PM
It should move forward by 1 stud in the direction the primary part is facing. Tested for ya
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 02:06 PM
I tested it aswell and it didn't work as I thought, CFrame.new(0,0,-1) is a coordinate, not the facing part.

Please don't say it did work because I tested it.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 02:09 PM
Like when I tried it, it began moving sideways :P
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
23 Dec 2014 02:11 PM
Literally, tested it again, xD


It sends it forward in the lookvector of the brick by 1 stud at a time.


Otherwise, you could use bodyvelocity :

BodyVelocity.velocity = somecframe.lookVector * 1
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
23 Dec 2014 02:13 PM
Oh I editted some numbers in the CFrame and it moves forward.

Thanks for the help.
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