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

How do I SetPrimaryPartCFrame without rotating the model?

When I use SetPrimaryPartCFrame it rotates my model and it faces the left instead of the front even though I only put a position in my CFrame.new.

    jojo=script.Parent.Parent --model
    function apply()
    pos=script.Parent.Value --vector3
    jojo:SetPrimaryPartCFrame(CFrame.new(pos))
    end
    script.Parent.Changed:Connect(apply)

How do I set the position without changing the orientation or how do I set the orientation?

4 comments

0

You can do CFrame.new(X, Y, Z), which is specfically a position.

0

Try using MoveTo instead of SetPrimaryPartCFrame

0

@Joshument no

0

CFrame is a data type of Position and Orientation , I personally agree with @MCAndRobloxUnited.

1 answer

✓ Accepted answer

The MoveTo object function is better in terms of moving without orientation changes. Since you are working with CFrame, it will require you to change to Vector3 for MoveTo.

1 comment

0

thanks

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