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

Is there a way to stop a brick at a certain spot using cframe?

Asked by 6 years ago
Edited 6 years ago
function Open()
    repeat
        local Parts = script.Parent.Parts
        local PrimaryCFrame =Parts:GetPrimaryPartCFrame()
        local OpenedCFrame = script.Parent.OpenedCFrame.CFrame
        Parts:SetPrimaryPartCFrame(PrimaryCFrame * CFrame.new(-0.05, 0, 0))
        wait()
    until PrimaryCFrame:pointToWorldSpace() == OpenedCFrame:pointToWorldSpace()
end


Open()

Anyway if print(PrimaryCFrame) the cframe of it is wacked up with man decimals and I was wondering if there was a different way to do t his, basically I am just trying to move a model by is primary part, but the "PrimaryCFrame" Keeps have 10+ decimal places.

0
to move a part try using tween service http://wiki.roblox.com/index.php?title=API:Class/TweenService outlook1234567890 115 — 6y

Answer this question