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

Doesn't rotate, what's wrong with CFrame.Angles?

Asked by 4 years ago

Currently, it looks like this: https://streamable.com/hsqcdl

It should be flat on the floor.

    local dz = game.ReplicatedStorage.Deadzone:Clone()
    local newDzCFrame = CFrame.Angles(math.rad(90),0,0)
    dz.Parent = workspace
    dz.CFrame = dz.CFrame * newDzCFrame
    dz.CFrame = root.CFrame * CFrame.new(0,-2,-15) --test
    game.Debris:AddItem(dz, dzTime)

2 answers

Log in to vote
0
Answered by 4 years ago
local dz = game.ReplicatedStorage.Deadzone:Clone()
dz.CFrame = CFrame.Angles(math.rad(90),0,0) + (root.CFrame.Position + Vector3.new(0,-2,-15))
dz.Parent = workspace
game.Debris:AddItem(dz, dzTime)

Try something like this.

Ad
Log in to vote
0
Answered by 4 years ago
local dz = game.ReplicatedStorage.Deadzone:Clone()
local newDzCFrame = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
dz.Parent = workspace
dz.CFrame = dz.CFrame * newDzCFrame
dz.CFrame = root.CFrame * CFrame.new(0,-2,-15) --test
game.Debris:AddItem(dz, dzTime)

would this work?

0
doesn't work, thanks for helping tho. bittersweetfate 142 — 4y
0
sure. User#29913 36 — 4y

Answer this question