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
03 Sep 2013 12:55 PM
I previously had a similar issue but it was a little bit different.
"magnalite" then told me this would be the fix:
Workspace.Model.Torso.CFrame = CFrame.new(positionToGoto, positionToLookAt)

So I did that and this happened:
http://www.youtube.com/watch?v=zFR2xSj8W7M

Instead of whats happening now, the creature should (on each teleport) be standing on the floor, his hands pointing towards you. Not like this.

Additional info: It's a welded model without a humanoid.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:05 PM
Workspace.Model.Torso.CFrame = CFrame.new(positionToGoto + Vector3.new(0,6,0), positionToLookAt)


Your teleporting him into the floor.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:19 PM
local torsoPos = workspace.Player1.Torso.Position
local torsoNew = torsoPos + Vector3.new(math.random(-10,10), 6 ,math.random(-10,10))
b.Torso.CFrame = CFrame.new(torsoNew, torsoPos)


technically the same as yours, this time, THIS happened:
http://www.youtube.com/watch?v=FobGdOjXzRY
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:22 PM
Bleh lets just use roblox's collision detection to fix it real quick.


local torsoPos = workspace.Player1.Torso.Position
local torsoNew = torsoPos + Vector3.new(math.random(-10,10), 0 ,math.random(-10,10))
b.Torso.Position = torsoNew
b.Torso.CFrame = CFrame.new(b.Torso.Position, torsoPos)


If that starts breaking it then put b:MakeJoints() at the bottom.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:26 PM
It just dissapears from workspace, maybe falls to debris..?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:27 PM
Did you try b:MakeJoints()?
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:28 PM
yes
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:31 PM
I think I could just implement pathfinding and make the walkspeed really darn fast.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:31 PM
wait no i couldnt its not a humanoid...
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:34 PM
Don't do that lol.


local torsoPos = workspace.Player1.Torso.Position
local torsoNew = torsoPos + Vector3.new(math.random(-10,10), 6 ,math.random(-10,10))
b:MoveTo(torsoNew)
b.Torso.CFrame = CFrame.new(torsoNew, Vector3.new(torsoPos.X, torsoNew.Y, torsoPos.Z))
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:44 PM
this somewhat works but on occasion the npc wipes out and slips on the floor and is sideways on the floor from that moment, on every warp.

while wait(warp_interval) do
for i,v in pairs(b:children()) do
if v:isA("BasePart") then
v.Anchored = false
end
end
local torsoPos = workspace.Player1.Torso.Position
local torsoNew = torsoPos + Vector3.new(math.random(-15,15), 6 ,math.random(-15,15))
b:MoveTo(torsoNew)
b.Torso.CFrame = CFrame.new(torsoNew, Vector3.new(torsoPos.X, torsoNew.Y, torsoPos.Z))
b:MakeJoints()
wait(.3)
for i,v in pairs(b:children()) do
if v:isA("BasePart") then
v.Anchored = true
end
end
end
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:48 PM
Add a body gyro with the following properties.

D = 500
P = 3000
MaxTorque = 50000000, 0, 0
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
03 Sep 2013 01:51 PM
in the model or a part of it?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 01:54 PM
In the torso.
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