while true do
wait(5)
local ez = math.random(1,4)
if ez == 1 then
script.Parent.Parent.Orientation = Vector3.new(0,90,0)
end
if ez == 2 then
script.Parent.Parent.Orientation = Vector3.new(0,0,0)
end
if ez == 3 then
script.Parent.Parent.Orientation = Vector3.new(0,180,0)
end
if ez == 4 then
script.Parent.Parent.Orientation = Vector3.new(0,-90,0)
end
end
Now let me explain, I have this bunny that is supposed to just run around.
But I cant make the entire model turn? (It runs in random directions.)
Yes, it has a primary part.
NOTE: I found solution, used pivot instead. If you wanna use the model in your games, as long as you give a small amount of credit you can use. Bunny V3 - Roblox
local rotations = {-90, 0, 90, 180}
while wait(5) do
local rotation = rotations[math.random(1, #rotations)]
script.Parent.Parent:SetPrimartyPartCFrame(CFrame.Angles(0, math.rad(rotation), 0))
end
local rotations = {-90, 0, 90, 180}
while wait(5) do
local rotation = rotations[math.random(1, #rotations)]
script.Parent.Parent:SetPrimartyPartCFrame(CFrame.Angles(0, math.rad(rotation), 0)
end end)
Reminder - I do not suggest using :SetPrimaryPartCFrame() and for you to convert to :PivotTo() as :SetPrimaryPartCFrame() is going to be marked as deprecated by the end of the year.
Hey! This doesnt work, instead my bunny just teleports across the map, it does change its orientation but it teleports.
Keep in mind this is combined with a simple cframe script.
local rotations = {-90, 0, 90, 180}
while wait(3) do
local rotation = rotations[math.random(1, #rotations)]
script.Parent:PivotTo(script.Parent:GetPivot() * CFrame.Angles(0, math.rad(rotation), 0))
end
Keep in mind, The :GetPivot() returns the orientation of the pivot point. You can modify that through these buttons on your “Model” tab on the top bar.