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 » Scripters
Home Search
 

Re: I don't get CFrame.

Previous Thread :: Next Thread 
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
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
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
21 Aug 2016 05:25 PM
Please? ;-;
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
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
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
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
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
21 Aug 2016 05:32 PM
Read
what
I
said
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
21 Aug 2016 05:33 PM
maybe
read
what
he
said
:P
Report Abuse
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
21 Aug 2016 05:35 PM
I did. If I understood it then the problem would be solved. Sadly I do not.
Report Abuse
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
21 Aug 2016 05:37 PM
I'm not sure how to implement it into my script.
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
21 Aug 2016 05:37 PM
what don't you understand about it?
Report Abuse
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Fresh_Effect is online. Fresh_Effect
Joined: 05 Feb 2012
Total Posts: 1342
21 Aug 2016 05:54 PM
Lol, I appreciate your help.

But there's no need to be so hostile.

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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