Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you set a bodygro to a part's position?

I want a bodygyro to keep a part straight. How do I make it look where the part is currently looking? It doesn't have a position property or anything like the bodyposition.

1 answer

✓ Accepted answer

Look at the Wiki article or the Object Browser for that matter.

It does have a .cframe property which is the "The rotation goal of the object".

The Properties tab never lists CFrame properties, which is why it's not listed there.


A part's current CFrame is simply part.CFrame, so to set its BodyGyro to keep it in the same orientation, you could use

part.BodyGyro.cframe = part.CFrame
-- Note the case of `cframe` and `CFrame`.

3 comments

0

@Blue; do you know who it could be suggested to to have an option to display CFrame values in Properties?

0

I don't know who deals with that, you could try asking on the #roblox IRC on freenode and someone there might be able to answer.

0

Another reason why i shouldn't script at 3am

This discussion is preserved as it was. New answers, comments, and votes are closed.