Hi I’m Nathanielishoot and I am trying to make a basic wall rotation system but for some reason it’s not working. For context I have a folder called “Walls” and the children inside of it are the walls called “Wall”. When I test the script nothing happens and no errors go into the output. Someone please help.
local walls = game.Workspace.Walls:GetChildren()
local orientation = CFrame.Angles(0, math.rad(90), 0) -- Rotate 90 degrees around the y-axis
for i, Wall in ipairs(walls) do
for j, part in ipairs(Wall:GetChildren()) do
part.CFrame = orientation * part.CFrame
end
end
while true do
for i, Wall in ipairs(walls) do
for j, part in ipairs(Wall:GetChildren()) do
part.CFrame = orientation * part.CFrame
print(part.CFrame)
end
end
wait(5)
end