Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cframe and Vector 3 to move model but problem with orientation ?

Asked by 5 years ago

So , i want to create a mdel who move with a script so i made that

workspace.Supercomputer.Bottom.PrimaryPart = workspace.Supercomputer.Bottom.Inside

script.parent.touched:connect(function()
    if script.parent.Activated.Value == "Desactivate" then

    for i = 1,5 do
        wait(0.1)
        workspace.Supercomputer.Bottom:SetPrimaryPartCFrame(CFrame.new(workspace.Supercomputer.Bottom.PrimaryPart.Position + Vector3.new(0,0.2,0)))

    end
    script.Parent.Activated.Value = "Activate"
    end
end)

The problem is that when i use Vector3 to move the model it change the orientation of the model to 0,0,0 So the model/part is not in the direction that i like . I already try to change the orientation in the script but it doesnt work so if u know help me :D

0
You're using Vector3 when Vector3 has only position information. Use CFrames, they hold both User#24403 69 — 5y
0
I can't understand this uhh question AradIsHere 2 — 5y
0
wtf? then why post that? it's unnecessary. you're not being very helpful here User#24403 69 — 5y

Answer this question