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: CFraming the Character

Previous Thread :: Next Thread 
drmiewlo is not online. drmiewlo
Joined: 14 Mar 2012
Total Posts: 1782
22 Nov 2011 02:02 PM
I have a script that Anchors the character and then CFrames it onto a part. Everything works fine except that the torso doesn't anchor until a little while after the rest are CFramed:

local debounce = false

b = script.Parent
b.Touched:connect(function(hit)
t = hit.Parent:FindFirstChild("Torso")
ll = hit.Parent:FindFirstChild("Left Leg")
rl = hit.Parent:FindFirstChild("Right Leg")
la = hit.Parent:FindFirstChild("Left Arm")
ra = hit.Parent:FindFirstChild("Right Arm")
human = hit.Parent:FindFirstChild("Humanoid")
if human == nil then return end
if debounce ~= false then return end
debounce = true
t.Anchored = true
ll.Anchored = true
rl.Anchored = true
la.Anchored = true
ra.Anchored = true
t.CFrame = CFrame.new(b.Position.x,b.Position.y + 2, b.Position.z - 0.5) * CFrame.Angles(0,math.pi,0)
ll.CFrame = CFrame.new(b.Position.x + 0.5,b.Position.y + 0.6, b.Position.z - 0.5) * CFrame.Angles(math.pi + math.pi/2,0,0)
rl.CFrame = CFrame.new(b.Position.x - 0.5,b.Position.y + 0.6, b.Position.z - 0.5) * CFrame.Angles(math.pi + math.pi/2,0,0)
la.CFrame = CFrame.new(b.Position.x - 1.5,b.Position.y + 2.5, b.Position.z - 0.5) * CFrame.Angles(math.pi + math.pi/2,0,0)
ra.CFrame = CFrame.new(b.Position.x + 1.5,b.Position.y + 2.5, b.Position.z - 0.5) * CFrame.Angles(math.pi + math.pi/2,0,0)
wait(5)
t.Anchored = false
ll.Anchored = false
rl.Anchored = false
la.Anchored = false
ra.Anchored = false
wait(10)
debounce = false
end)
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
22 Nov 2011 02:04 PM
Try making it the head for some reason anchoring the torso has bugs and stuff sometimes people can still run and only freeze when jump etc
Report Abuse
drmiewlo is not online. drmiewlo
Joined: 14 Mar 2012
Total Posts: 1782
22 Nov 2011 02:10 PM
That wouldn't work, I need to have the torso be CFramed and anchored, it's a scripted seat that you can't jump out of.
Report Abuse
drmiewlo is not online. drmiewlo
Joined: 14 Mar 2012
Total Posts: 1782
22 Nov 2011 02:11 PM
Anyone who knows what they're talking about?
Report Abuse
drmiewlo is not online. drmiewlo
Joined: 14 Mar 2012
Total Posts: 1782
22 Nov 2011 02:24 PM
bump
Report Abuse
WhoBloxedWho is online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
22 Nov 2011 02:35 PM
Loop the CFrame part so it's constantly moving the players parts into their desired positions? then just break the loop when they player wants to move.
Report Abuse
drmiewlo is not online. drmiewlo
Joined: 14 Mar 2012
Total Posts: 1782
22 Nov 2011 02:50 PM
That's not the problem... It's that the torso won't anchor correctly.
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