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: CFrame issues with a model

Previous Thread :: Next Thread 
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
01 Sep 2013 04:07 PM
Here's a demonstration of the issue I'm having:
http://www.youtube.com/watch?v=0vFNJ6oyHq0

What really should be happening:
The NPC should be standing and facing you with his hands pointed towards you.

Here's the code for it:
pastebin/emAhpW9P


How would I fix this? I don't really specialize in cframe,directional vectors and such.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
01 Sep 2013 04:23 PM
I think you are trying to make the model move toward the player. Use MoveTo() on the humanoid instead

Age of War Update Forum: [http://www.roblox.com/Forum/ShowPost.aspx?PostID=110942955]
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
01 Sep 2013 04:24 PM
It's not a humanoid. It's simply a model.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
01 Sep 2013 04:25 PM
What exactly are you trying to get it to do?

Age of War Update Forum: [http://www.roblox.com/Forum/ShowPost.aspx?PostID=110942955]
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
01 Sep 2013 04:25 PM
model.Humanoid:MoveTo()
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
01 Sep 2013 04:27 PM
Like I already said, Everytime the NPC teleports, it should be standing and facing you with his hands pointed towards you.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
01 Sep 2013 04:32 PM
You want it to teleport?

Age of War Update Forum: [http://www.roblox.com/Forum/ShowPost.aspx?PostID=110942955]
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
01 Sep 2013 04:35 PM
It already is teleporting but I want it to face the player everytime it does.

Do you have eyes? It does it on the video but just faces the wrong direction
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
01 Sep 2013 04:38 PM
I cant get the pastebin page loaded. Do you mind sending me the script in a message?

Age of War Update Forum: [http://www.roblox.com/Forum/ShowPost.aspx?PostID=110942955]
Report Abuse
MechaStripeZ is not online. MechaStripeZ
Joined: 07 Aug 2013
Total Posts: 378
01 Sep 2013 04:38 PM
model.Humanoid.move.1.steps.90.degrees.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
01 Sep 2013 04:38 PM
Assuming it is welded as expected couldn't you do

model.Torso.CFrame = CFrame.new(lePlace, playerToLookAtTorsoPos)
model:MakeJoints()

Or would that just break it?
Report Abuse
MechaStripeZ is not online. MechaStripeZ
Joined: 07 Aug 2013
Total Posts: 378
01 Sep 2013 05:28 PM
That would rotate it so it would wreck it.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
01 Sep 2013 05:36 PM
He wants it rotated..
Report Abuse
MechaStripeZ is not online. MechaStripeZ
Joined: 07 Aug 2013
Total Posts: 378
01 Sep 2013 05:40 PM
Yes, I know. But if you were to rotate the whole body seperatly it would dismantle in-game when you make contact with it or even interact with it.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
02 Sep 2013 05:30 AM
bump
Report Abuse
MechaStripeZ is not online. MechaStripeZ
Joined: 07 Aug 2013
Total Posts: 378
02 Sep 2013 05:52 AM
Bump
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
02 Sep 2013 08:00 AM
bump.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
02 Sep 2013 08:01 AM
Its a welded model without a humanoid. Will it break its joints if I rotate just the torso?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
02 Sep 2013 08:02 AM
Let me try find a solution for you.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
02 Sep 2013 08:06 AM
What I said works fine (just tested)


Workspace.Model.Torso.CFrame = CFrame.new(positionToGoto, positionToLookAt)


As long as it is welded properly it wont break.
Report Abuse
MechaStripeZ is not online. MechaStripeZ
Joined: 07 Aug 2013
Total Posts: 378
02 Sep 2013 01:07 PM
Exactly.
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