|
| 21 Aug 2016 05:20 PM |
So I'm trying to weld a part to a players back but it isn't rotated properly. I don't understand how there's 9 rotation values when there's only 3 in properties. I need to add the rotation (-90, -45, -90) to the part called "New" but I have no idea how to.
p = script.Parent New = game.ServerStorage.Add:Clone() New.Parent = p
Weld = Instance.new("Weld") Weld.Parent = New Weld.Part0 = New Weld.Part1 = p.Torso Weld.C0 = CFrame.new(0,0,-1)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Aug 2016 05:25 PM |
why not just use Vector3?
like New.Rotation = Vector3.new(-90,-45,-90) or New.Rotation = New.Rotation + Vector3.new(-90,-45,-90) to add to it?
|
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:26 PM |
CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
CFrame angles are in Radians
And Weld C0 is the offset of the weld's Pivot from Part0 |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:28 PM |
Because when I change the rotation it breaks the weld.
I have no idea what to do. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:29 PM |
| i dont know a lot about welds or what your doing but cant you weld it after you rotate it? |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:32 PM |
when I add
New.Rotation = Vector3.new(-90, -45, -90)
before the script it just welds it and changes the rotation back
and when I add it after the script it breaks the weld |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 21 Aug 2016 05:35 PM |
| I did. If I understood it then the problem would be solved. Sadly I do not. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:37 PM |
| I'm not sure how to implement it into my script. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:37 PM |
| what don't you understand about it? |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:47 PM |
I TRIED
I PLUGGED IN EVERY STUPID NUMBER THE WIKI TOLD ME TO
gyazo.com/3bb67b57b83dd923496cfe566737e819
AND GUESS WHAT?
NOTHING HAPPENED. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:47 PM |
Lmao the wiki isn't what's stupid
Weld.C0 = CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-90)) |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:52 PM |
Fine. I'm stupid. I couldn't care less.
Why doesn't this work?
Weld.C0 = CFrame.new(0, 0, -1) + CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-90))
Output says
Workspace.Fresh_Effect.Script:9: bad argument #2 to '?' (Vector3 expected, got CFrame) |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:53 PM |
If you had actually looked at the wiki
you would realize you need to MULTIPLY
Kid, actually try and learn something please |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:54 PM |
Lol, I appreciate your help.
But there's no need to be so hostile.
|
|
|
| Report Abuse |
|
|