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: Pointing bricks at your mouse

Previous Thread :: Next Thread 
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 03:52 PM
What Body thing would I use? I'm pretty sure BodyGyro. And how would I edit the properties to point at a certain point in the world?
Report Abuse
cart6157 is not online. cart6157
Joined: 28 Feb 2009
Total Posts: 2194
08 Mar 2013 03:54 PM
local mouse = player:GetMouse()

Look in the wiki for 'mouse' and you'll see a lot of properties. This is just how to get it.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 03:55 PM
I know how to do that. Do you not read at all? I'm looking for the Body-thing type I need, and what properties to edit.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 04:10 PM
Bump.
Report Abuse
WhoBloxedWho is not online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
08 Mar 2013 04:15 PM
body gyro.

mouse = game.Players.LocalPlayer:GetMouse()
part = the part your using
gyro = part.BodyGyro

mouse.Move:connect(function()
gyro.cframe = CFrame.new(part.Position, mouse.Hit.p)
end)


local script of course. The function will fire when ever the mouse moves.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 05:08 PM
Would there be any way to just change the the Z and X values so the brick stays level?
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
08 Mar 2013 05:44 PM
Just set no torque on those axis.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 05:50 PM
Also, Is there a way to point a specific surface on the block?
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
08 Mar 2013 05:53 PM
Mouse.hit.p if you want the position where you hit, mouse.hit I believe returns the object, or you could extrapolate from the position and size where the edges are and work from there.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 06:02 PM
I mean, the block with the gyro. Is there a way to always point one specific surface of that block at the mouse?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Mar 2013 08:13 PM
Bump
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