I made this spinning birds that spins around and I'm satisfied with it. But it lag my game though, is there a way to prevent the lag from happening? Can anyone help me?
Here is my layout of the model:
https://gyazo.com/9cf296413be0a2b7677fcf670685ad35
If you need more details, here is a short clip of how the model works:
https://gyazo.com/9e345e8d5a59f9eade4b7cfaf76ba35d
Finally, this is the script that make the model spin:
local function rotate_model(model,angle)
local center = model:GetModelCFrame()
local part = Instance.new("Part")
part.CFrame = center
model.PrimaryPart = part
model:SetPrimaryPartCFrame(center*angle)
part:Destroy()
end
local tornado = script.Parent
while wait(.03) do
rotate_model(tornado,CFrame.Angles(0,0.1,0))
end

1 comment
If you need more elaboration, check out the Roblox Wiki post. http://wiki.roblox.com/index.php?title=Loops