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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: rotationbased movement

Previous Thread :: Next Thread 
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
15 Nov 2016 11:08 AM
Hi, I want to start making games for roblox and i need help with a script. I want to know how to creat rotationbased mopvement. what i mean is that i want a thing to move forwarn no mater what direction its facing. Ive seached on google but i cant fing how to do it. Help would be much appreciated.

/WilhelmP
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
15 Nov 2016 11:14 AM
local Part = game.Workspace:WaitForChild("Part")
while true do
Part.CFrame = Part.CFrame + Vector3.new(0,0,0.1)
wait(0.2)
end
Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
15 Nov 2016 11:17 AM
Didn't work D:
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
15 Nov 2016 11:22 AM
I have no idea what thedagz posted but it was definitely not what you wanted

Can you expand on what you want? The movement like when in shift-lock?


Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
15 Nov 2016 11:32 AM
if i want to build a flying vehicle i dont want it to fly backwards if its rotated and i press "w". so if its facing south and i press "w" it will go south and so on in all directions. no need for how to do the buttonpressing thing since i know that.
Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
15 Nov 2016 11:33 AM
think of the character in firstperson mode, it goes forwards
Report Abuse
Auzer is not online. Auzer
Joined: 24 Dec 2011
Total Posts: 1590
15 Nov 2016 12:05 PM
You want a part that moves in world space

part = Instance.new("Part", workspace)
while part and wait() do
part.CFrame = part.CFrame * CFrame.Angles(0, 0.02, 0) + Vector3.new(0.1, 0, 0)
end


Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
15 Nov 2016 01:36 PM
nope, not working, just a rotating part going in the positiv x direction.
Report Abuse
Auzer is not online. Auzer
Joined: 24 Dec 2011
Total Posts: 1590
17 Nov 2016 06:41 AM
"move forwarn no mater what direction its facing". That's pretty much what the part does. No matter the rotation it will still move forward on the x axis.


Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Nov 2016 09:24 AM
part.CFrame = part.CFrame * CFrame.new(0, 0, -2)

it's that simple.
Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
21 Nov 2016 12:26 PM
you don't understand. think of a firstperson game.
Report Abuse
WilhelmP is not online. WilhelmP
Joined: 27 Aug 2014
Total Posts: 28
22 Nov 2016 06:15 AM
Thank you cntkillme :D it worked
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