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: Welds and CFrame stuff

Previous Thread :: Next Thread 
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
17 Nov 2012 06:27 AM
So I have a fake head which welds to the normal head and turns according to where the mouse is pointing. I use this line:

headweld.C1 = CFrame.new(character.Head.Position,mouse.Hit.p):inverse()

But it doesn't work as expected, the head appears floating like 100 studs above the character.

Does anyone know about CFrame maths?
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
17 Nov 2012 06:46 AM
headweld.C1 = CFrame.new(character.Head.Position, character.Humanoid.TargetPoint)
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
17 Nov 2012 08:13 AM
Nope, but thanks anyway.

The issue isn't the mouse, it's the CFrame maths.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
17 Nov 2012 09:05 AM
@eJorge,
I believe TargetPoint gives you something relative to your player or something, so at least try it.
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
17 Nov 2012 01:32 PM
Again, it's the maths what I need to fix.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
17 Nov 2012 04:08 PM
@eJorge
Again, the value TargetPoint gives you is different and relative to the player, so it may fix your problem.
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
17 Nov 2012 04:56 PM
You don't understand me :l

Does someone know the expression to make this work in a weld?
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
18 Nov 2012 11:05 AM
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