Hello, I’m making a spinning viewport frame for my loadout menu. I’ve basically got it done so far, but… the model clones for some reason?
Code (not focused on why all the models dont spin):
local viewportFrames = script.Parent:GetChildren() -- Get all ViewportFrames that show characters
for _, frame in ipairs(viewportFrames) do
if frame:IsA("ViewportFrame") then
local model = frame:FindFirstChildOfClass("Model") -- Get the Character Model from the VPF
local humanoidRootPart = model:WaitForChild("Handle")
while game:GetService("RunService").RenderStepped:Wait() do
humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.Angles(0, math.pi/200, 0)
end
end
end