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 5 years ago

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

It should be flat on the floor.

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

2 answers

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

Try something like this.

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

would this work?

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

Answer this question