BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 03:42 PM |
wait(.5) local w1 = Instance.new("Weld") w1.Parent = script.Parent:FindFirstChild("Left Arm") w1.Part0 = w1.Parent w1.Part1 = script.Parent.Torso w1.C1 = CFrame * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) wait(5) |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 03:45 PM |
> w1.C1 = CFrame * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
CFrame itself is a table, but the C1 property's value must be a CFrame value. I'm not sure whether you want it to rotate from the position 0, 1, 0, or from the CFrame it's already it, so if you want the former, do:
w1.C1 = CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
If you want the latter, do:
w1.C1 = w1.CFrame * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 03:46 PM |
I'm sorry, I made a mistake. If you want the latter, do:
w1.C1 = w1.C1 * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 30 Apr 2012 03:47 PM |
CFrame * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
What's the original CFrame for? You can plug that in, or just use this:
wait(.5) local w1 = Instance.new("Weld") w1.Parent = script.Parent:FindFirstChild("Left Arm") w1.Part0 = w1.Parent w1.Part1 = script.Parent.Torso w1.C1 = CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) wait(5) |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 03:48 PM |
| @L2 - Do you want some jelly with that latetoast? |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 03:54 PM |
| Basicly i want the origanal place that it starts off to be first then it changes the angle from there but i cant get that working. |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 30 Apr 2012 03:55 PM |
Try this:
wait(.5) local w1 = Instance.new("Weld") w1.Parent = script.Parent:FindFirstChild("Left Arm") w1.Part0 = w1.Parent w1.Part1 = script.Parent.Torso w1.C1 = w1.C1 * CFrame.fromEulerAnglesXYZ(0,0,math.pi/4) wait(5)
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 03:55 PM |
All right, so you would do the latter. Change the whole thing to:
wait(.5) local w1 = Instance.new("Weld") w1.Parent = script.Parent:FindFirstChild("Left Arm") w1.Part0 = w1.Parent w1.Part1 = script.Parent.Torso w1.C1 = w1.C1 * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) wait(5) |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 03:57 PM |
| may i ask what does latter mean? |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
| |
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:03 PM |
Its still not working?
wait(.5) local w1 = Instance.new("Weld") w1.Parent = script.Parent:FindFirstChild("Left Arm") w1.Part0 = w1.Parent w1.Part1 = script.Parent.Torso w1.C1 = w1.C1 * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,0) wait(5) w1.C1 = w1.C1 * CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,1,0) |
|
|
| Report Abuse |
|
|
| |
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:10 PM |
| None but the arm is not moving :( |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 30 Apr 2012 04:11 PM |
| Use mine, and it should work. |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:22 PM |
I got it to work but then i relised i need the modle to be ancored so i cant use Weld cfame. So i am just using cframe but now its not working?
Ra = script.Parent:FindFirstChild("Left Arm") Ra.CFrame = Ra.CFrame.fromEulerAnglesXYZ(1, 0, 0) * CFrame.new(-1.5, 0, 0) wait(5) Ra.CFrame = Ra.CFrame.fromEulerAnglesXYZ(1.5, 0, 0) * CFrame.new(-1.5, -.5, -.5)
|
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:26 PM |
| fromEulerAnglesXYZ is not a valid member |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 30 Apr 2012 04:29 PM |
CFrame.fromEulerAnglesXYZ instead of Ra.CFrame.
Ra = script.Parent:FindFirstChild("Left Arm") Ra.CFrame = CFrame.fromEulerAnglesXYZ(1, 0, 0) * CFrame.new(-1.5, 0, 0) wait(5) Ra.CFrame = CFrame.fromEulerAnglesXYZ(1.5, 0, 0) * CFrame.new(-1.5, -.5, -.5)
Also, it's much easier to do this with Ra.CFrame * Instead of CFrame.new(), so use this:
Ra = script.Parent:FindFirstChild("Left Arm") Ra.CFrame = CFrame.fromEulerAnglesXYZ(1, 0, 0) * Ra.CFrame wait(5) Ra.CFrame = CFrame.fromEulerAnglesXYZ(1.5, 0, 0) * Ra.CFrame
|
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:38 PM |
| How would i set the cframe start up if the players position was randomly spawned evrey time? |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 30 Apr 2012 04:41 PM |
So, you want to move the player to a random location, then use this script on the player?
Simple: 1) Teleport the player 2) Run the second version of this script (As it's reliant on the CFrame of the part, it doesn't matter where it is). |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 30 Apr 2012 04:47 PM |
Well how come my script sets 0,0,0 as the middle of the map and not were the arm is oragnaly placed on the modles body.
Ra = script.Parent:FindFirstChild("Left Arm") Ra.CFrame = CFrame.fromEulerAnglesXYZ(190.5, 6.4, -36.5) * CFrame.new(0, 0, 0) wait(5) Ra.CFrame = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0,0,0) |
|
|
| Report Abuse |
|
|