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

How to add X/Z/Y Values to a CFrame?

I want to make my CFrame Y value to change, and only that XYZ value to change.

Please help me with it! I've tried to code it here it is:

script.Parent.CFrame.Y = script.Parent.CFrame.Y + 20

1 answer

✓ Accepted answer

CFrame:ToWorldSpace()

In your situation, you'd use it like this,

script.Parent.CFrame = script.Parent.CFrame:ToWorldSpace(CFrame.new(0,20,0))

2 comments

0

Thank you so much!

0

Tech remember to click "Accept Answer", so that it gets marked as solved and people can find the answer to this question later.

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