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: I need an explonation.

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
27 Apr 2013 09:30 AM
My logic is once more not getting this:

local part = game.Workspace.Part1.BodyGyro
script.Parent.Selected:connect(function(mouse)
while not part do wait() end
mouse.Move:connect(function()
part.cframe = CFrame.new(part.Parent.Position, mouse.Hit.p)
end)
end)


So first question, so it rotates through the position of it?

And second question.Why is it a comma in CFrame.new()

Shouldnt it be pluss? since pluss pluss is like thing AND thing.And thats comma to??
Report Abuse
TheGamer101 is not online. TheGamer101
Joined: 14 Feb 2009
Total Posts: 11943
27 Apr 2013 09:55 AM
"part.cframe = CFrame.new(part.Parent.Position, mouse.Hit.p)"

In this instance CFrame.new takes two arguments, a Vector3 position and a point to look at. The CFrame is at that position facing the mouse.Hit.p.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
27 Apr 2013 10:09 AM
So, bodygyro needs two arguments for CFrame.new?
Report Abuse
TheGamer101 is not online. TheGamer101
Joined: 14 Feb 2009
Total Posts: 11943
27 Apr 2013 10:17 AM
@Fedorakid

Doesn't need, no. Just explaining why there were 2 arguments to CFrame.new() in that case.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
27 Apr 2013 10:19 AM
Alright then.
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