Rotating weld using variable errors

trying to rotate a weld with a vector3value but errors

weld.C0 = CFrame.Angles(C0Rotate)

if i replace the C0Rotate variable with numbers it works fine, any variable breaks the cframe

how fix

1 Like

Maybe its because you aren’t calling for the CFrame and instead just referencing the attatchment.

Try weld.C0.CFrame and then multiply it with the given angles.

how would i do this


Its quite simple, not much else to explain.

Just make sure you put weld.CFrame and then do = weld.CFrame * CFrame.Angles(1, 2 3).

Since you don’t seem to know about CFrames that much, I recommend you use the Roblox Api for reference.

so like this ?

weld.C0.CFrame = weld.CFrame * CFrame.Angles(C0Rotate)

Yes, try that, it should work.


 CFrame is not a valid member of Weld "Workspace.aeroactual.GasMaskModelClone.GasMaskModelClone Weld"  -

its something to do with the variable, it works fine when i put in the numbers normally but i need to use da variable

weld.C0 = CFrame.Angles(5,5,5)


weld.C0 = CFrame.Angles(C0Rotate)

- Argument 3 missing or nil  -  Server - SlingHandler:11


C0Rotate is just 3,3,3

Its because you didnt’t use .CFrame.

I advise you to look at this article

the variable C0Rotate is a vector3value with 5,5,5
am asking how to get it working using the vector3value, it alrdy works without it
if (5,5,5) works why does (C0Rotate) error

I don’t think that you can use Vector3 with CFrame.Angles.
Try doing:

weld.C0 = CFrame.Angles(C0Rotate.X, C0Rotate.Y, C0Rotate.Z)

or just use a CFrameValue and not Vector3Value


this works thank you


1 Like

am having a problem with this

weld.C1 = CFrame.Angles(C1Rotate.X, C1Rotate.Y, C1Rotate.Z)

C1Rotate is (3, 90, -50)

but using that it rotates the weld to (-3.6, 63.6, -172)

i tried CFramevalue and same thing happens

Try turning
C1Rotate.X, C1Rotate.Y, C1Rotate.Z
into degrees using math.rad() so

weld.C1 = CFrame.Angles(math.rad(C1Rotate.X), math.rad(C1Rotate.Y), math.rad(C1Rotate.Z))

I forgot about this so I’d suggest doing it for C0 too.

1 Like

worked again thx alot

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.