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

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

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

✓ Accepted answer
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.

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?

2 comments

0

doesn't work, thanks for helping tho.

0

sure.

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