Hello scripters, i have a problem which need a help.
Why group doesnt rotate?
local object = script.Parent
while true do
object.Orientation.new = object.Orientation * object.Orientation.fromEulerAnglesXYZ(0, 15, 0)
wait(0.5)
end
Hello scripters, i have a problem which need a help.
Why group doesnt rotate?
local object = script.Parent
while true do
object.Orientation.new = object.Orientation * object.Orientation.fromEulerAnglesXYZ(0, 15, 0)
wait(0.5)
end
Set a primary part to the model then use this line:
object:SetPrimaryPartCFrame(object:GetPrimaryPartCFrame() * CFrame.Angles(0, 15, 0))
Couple of mistakes I have notice:
object.Orientation.new
is not the method to edit a BasePart
's orientation. Remove the .new
.Orientation
is a property which only has and accepts Vector3
values. Orientation.fromEulerAngles()
does not exist, that function belongs to CFrame.
I can give a corrected script, but I believe @AshMomper had given you the corrected script, except you have to use radians instead of degrees to edit rotations using CFrame
functions, by using math.rad()
function.
But here’s my solution
local object = script.Parent
while true do
object:PivotTo( object:GetPivot() * CFrame.fromEulerAnglesXYZ(0, math.rad(15), 0) )
wait(0.5)
end
though this won’t work if script.Parent
isn’t a PVInstance, I can’t tell whether it is because of lack of information.