so today i discovered Cframes i have been messing with them
brick = script.Parent while true do wait(0.001) brick.CFrame = brick.CFrame * CFrame.fromEulerAnglesXYZ(0.01,02,0) end
pls help
You're moving your brick 2 radians (about 114 degrees) in the y-axis every fraction of a second, which is a really big leap. You could do the following:
brick = script.Parent while wait() do brick.CFrame = brick.CFrame * CFrame.fromEulerAnglesXYZ(0 ,math.rad(1),0) end
But I prefer to do the following:
brick = script.Parent --runs the loop every 0.03 seconds (the default wait time) while wait() do --rotate the brick 1 degree in the x axis brick.CFrame = brick.CFrame * CFrame.Angles(math.rad(1), 0, 0) end
math.rad() converts a degree to a radian which is what the functions take as parameters