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: A bit of Humanoid Help.

Previous Thread :: Next Thread 
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
07 Nov 2009 06:16 PM
I want to make the Humanoid rotate exactly 35 degrees. I thought of using Humanoid.WalkDirection, but I forgot how to use it. I feel so stupid.
Report Abuse
harrycat18 is not online. harrycat18
Joined: 27 Sep 2008
Total Posts: 2441
07 Nov 2009 06:18 PM
WalkDirection isnt a function
Use something like

torso.CFrame = torso.CFrame * CFrame.fromEulerAnglesXYZ(0, math.deg(35), 0)

I forgot what turns degrees into radians :-P
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
07 Nov 2009 06:19 PM
xLEGOx said it was valid >_>

I was thinking of using fromEulerAnglesXYZ, but it wouldn't be a gradual turn would it?
Report Abuse
harrycat18 is not online. harrycat18
Joined: 27 Sep 2008
Total Posts: 2441
07 Nov 2009 06:23 PM
for x=1, 35 do
(that script, only by 1 degree each time)
end

idk how to use for commands very well
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
07 Nov 2009 06:24 PM
Well...

You could do that, but I was trying to do it a different way >_>
Report Abuse
harrycat18 is not online. harrycat18
Joined: 27 Sep 2008
Total Posts: 2441
07 Nov 2009 06:27 PM
Is it for a cutscene or just to mess with the player when they touch a brick?
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
07 Nov 2009 06:28 PM
Not a cutscene. Artifical Intelligence purposes.
Report Abuse
harrycat18 is not online. harrycat18
Joined: 27 Sep 2008
Total Posts: 2441
07 Nov 2009 06:39 PM
Ah...
If it were a cutscene you could use an anchored brick under the character, and a motor object...
You could probably use that with AI, but it would look wierd...
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
08 Nov 2009 08:42 AM
Bump.

So.... How do I do it with WalkDirection?
Report Abuse
gombob is not online. gombob
Joined: 01 May 2008
Total Posts: 5215
08 Nov 2009 08:46 AM
You can't. You'll have to do it with a CFrame

x.CFrame = x.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(35), 0)

I think it's math.rad()...
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
08 Nov 2009 08:48 AM
You CAN! Fine, without the help of the community I'll do it myself.
Report Abuse
RightLegRed is not online. RightLegRed
Joined: 02 Oct 2009
Total Posts: 6761
08 Nov 2009 08:49 AM
WalkDirection is a property. I think it's in CFrame.
Report Abuse
Camoy is not online. Camoy
Joined: 21 May 2009
Total Posts: 6207
08 Nov 2009 08:55 AM
WalkDirection is a property of Humanoid.
Report Abuse
MarcusShadow is not online. MarcusShadow
Joined: 28 Jun 2009
Total Posts: 73
17 May 2013 05:52 PM
Sadly WalkDirection, apparently is "Non-Scriptable", what that means, IDK,

But what I Do know though is that there's an easyer way to do this With the BodyGyro object, Now you want it in degrees, right? The object works in units of radians, but there is a scripting term that auto converts the degreese in radians:

turn = Instance.new("BodyGyro")
turn.Parent = (torso here)
turn.cframe = CFrame.new() * CFrame.Angles(0, math.rad(35), 0)
turn.maxTorque = Vector3.new( 40000, 40000, 40000)
wait(2)
turn:Remove()




thats it and make sure u spell cframe the way i spelled it the way my caps are i know its wierd that 1 has CF and 1 has cf, but its how its spelled
got a problem with that, then complain to Roblox's non-respawnsive answering machein, not my problem, not my fault

i dount u need this any more since the last update was years ago, but still
hope this helps




Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
17 May 2013 05:53 PM
Thank you for bumping this 2009 thread.
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