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: Part Faces Part

Previous Thread :: Next Thread 
darkjediwarriorX is online. darkjediwarriorX
Joined: 26 Aug 2015
Total Posts: 879
02 Dec 2016 04:08 PM
I want it so Part A, no matter where I drag it, Rotates so it is ALWAYS facing Part B, how can I do this?
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
02 Dec 2016 04:14 PM
PartA.Changed:connect(function()
PartA.CFrame = CFrame.new(PartA.Position, PartB.Position)
end)
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
02 Dec 2016 04:15 PM
Forget that last post.

game:getService("RunService").Heartbeat:connect(function()
PartA.CFrame = CFrame.new(PartA.Position, PartB.Position)
end)
Report Abuse
RoyStanford is online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
02 Dec 2016 04:26 PM
I'll never forget ;3

Side question what is the difference between Heartbeat and RenderStepped?
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
02 Dec 2016 04:27 PM
heartbeat is server sided i think
Report Abuse
RoyStanford is online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
02 Dec 2016 04:28 PM
Great ty bb
Report Abuse
darkjediwarriorX is online. darkjediwarriorX
Joined: 26 Aug 2015
Total Posts: 879
02 Dec 2016 04:29 PM
So Yeah, but I was wondering, what if I want to do it from a weld, so it only affects the Y rotation of part A
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
02 Dec 2016 04:30 PM
game:getService("RunService").Heartbeat:connect(function()
PartA.CFrame = CFrame.new(PartA.Position, Vector3.new(PartB.Position.X,partA.Position.Y,PartB.Position.Z))
end)
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
02 Dec 2016 04:31 PM
That should ensure part A stays flat along the X-Z plane
Report Abuse
darkjediwarriorX is online. darkjediwarriorX
Joined: 26 Aug 2015
Total Posts: 879
02 Dec 2016 04:35 PM
I want to stay only rotate on the Y axis, but it's doing x, or z, I think. Could you just come on to it and help me?

https://www.roblox.com/games/388364175/darkjediwarriorXs-Place-Number-26
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