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: Moving players head

Previous Thread :: Next Thread 
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
21 Jun 2012 12:49 PM
I have a problem.

I need to move the players head to another location. The reason of this is that Im creating a game that, on a point, you are not allowed to chat. The place is on bubble chat, however, people can still communicate using that. At some point I need to disable this. I know how to do that; Moving the players head. I have created a fake head for other reasons (welded to torso), but how do I move the real head (the head thats used to chat) without letting the player die?

CFrame doesnt work, Vector3 obivously kills.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
21 Jun 2012 12:50 PM
MeshOffset maybe?
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
21 Jun 2012 12:53 PM
MeshOffset? That wont work, because thats only for the mesh and not for the head itself. I need to move the head.

Why are some simple things SO incredibly hard?
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
21 Jun 2012 12:59 PM
Workspace.PlayerName.Torso['Neck'].C1 = CFrame.new(0, 10, 0)

Maybe?
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
21 Jun 2012 01:00 PM
xD I was about to post that im going to post that I could use the C0 and C1's of welds.

Thanks for helping, I guess C1 and C0 will work ;)
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
21 Jun 2012 02:18 PM
Darn it spectrumw I was gonna recommend that >:O
Anyway what I suggest doing is this,

You create a new Weld,

w = Instance.new("Weld")

Then attach the Torso as Part0, and head as Part1

w.Part0 = Torso
w.Part1 = Head

Then simply clone ROBLOX's default Joint called Neck and delete it from Torso,

Joint = Torso.Neck:clone()
Torso.Neck:Destroy()

Parent the weld...

w.Parent = Torso
w.Name = "NeckWeld" --Name it NeckWeld so that the Animation script doesnt confuse it with the Motor6D joint.


Next simply animate as you wish,

w.C0 = CFrame.new(0, 0, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
21 Jun 2012 02:31 PM
Thanks, but indeed C0 or C1 fixes it.

Bye bye chat :)

(*does a dance*: yay, my game can work now :D)
Report Abuse
thejonathann is not online. thejonathann
Joined: 14 Dec 2010
Total Posts: 76
22 Jun 2012 05:52 PM
posNeeded = Vector3.new(0, 10, 20)
char = Workspace.jobro13
off = posNeeded - char.Torso.CFrame.p
char.Torso.Neck.C0 = CFrame.new(0, 0, 0)
char.Torso.Neck.C1 = off
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
24 Jun 2012 05:40 AM
I already got an answer, but still thanks.
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