LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 18 Feb 2015 05:09 PM |
I wanted to make an arm on a Non-Humanoid object point at you, i only needed the arm pointing part.
If if do this:
Point = CFrame.new(Arm.Position, Player.Head.Position) Arm.CFrame = Point
it Points, but it looks like the arm is not attached. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:10 PM |
Make a weld/motor and rotate it based on the joint's C1.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 18 Feb 2015 05:12 PM |
| I wanted to use cframe. :/ |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:12 PM |
joint.C1.CFrame = CFrame.new()
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:13 PM |
Woops, C1 is a CFrame, so it's written like this:
joint.C1 = CFrame.new()
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:14 PM |
Then you can rotate it like this:
joint.C1 = CFrame.new() * CFrame.Angles()
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 18 Feb 2015 05:14 PM |
| Thanks, but is there a way without using joints and/or welds? |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:15 PM |
Leitris, explain HOW EXACTLY to use C1 just in case someone might want to know...
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2015 05:20 PM |
Local w = Instance.new("Weld",PARENT) w.Part0 = PARENT PART w.Part1 = PART CONNECTED TO PARENT PART w.C0 = JOINT POSITION w.C1 = PART'S OFFSET FROM JOINT
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:20 PM |
| http://wiki.roblox.com/index.php?title=Joint#Programmatic_Creation |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:20 PM |
Sorry if that looked harsh, I just wrote in caps to show where to put things. Kind of looked like I was yelling lol.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:22 PM |
Use the wiki. -_- http://wiki.roblox.com/index.php?title=Joint#Programmatic_Creation |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2015 05:23 PM |
| Oh. It tried to do a duplicate post. I hate that error. Although I have never actually posted a second time as a result of it, until now. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:23 PM |
lol I meant how to do the thing... cos CFrame.new(part.Position, target.Position) wont Work with Joints :P
Elite, I would but, I haven't yet Experimented with Arms... and also, I'm still in the Middle or even Beginning of figuring out how exactly the chunk of Code I have Works XD
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
Aj7Fish
|
  |
| Joined: 30 Dec 2014 |
| Total Posts: 500 |
|
|
| 18 Feb 2015 05:23 PM |
I added a script inside an npcs head, and I want to npcs head to stare at me and move it's head around facing me. I have this but it didn't work. Why Leitris?
game.Players.PlayerAdded:connect(function(player) local weld = Instance.new("Weld") weld.Part1 = script.Parent -- npc Head weld.Part0 = player:WaitForChild("Character").Head -- player's head weld.C1 = CFrame.new() * CFrame.Angles(player.Character.Head.Rotation) end)
|
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 18 Feb 2015 05:25 PM |
| Couldn't I just use CFrame alone? |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:29 PM |
CFrames alone wouldn't be Enough and in anyway, I'd Recommend Joints... u could Learn to Script ur Character Head and Arms follow Mouse for FPS Games...
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 18 Feb 2015 05:30 PM |
| I'm not using a humanoid :/ I'm using an anchored part :P |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2015 05:32 PM |
well anyway... all u need is
part.CFrame = CFrame.new(part.Position, target.Position)
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
| |
|
|
| 18 Feb 2015 05:44 PM |
lol
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|