lua local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait() local sub local viewportFrame = script.Parent.ViewportFrame local viewportCamera = Instance.new("Camera") viewportFrame.CurrentCamera = workspace.CurrentCamera viewportCamera.Parent = workspace game:GetService("RunService").RenderStepped:Connect(function() if sub then sub:Destroy() end sub = char:Clone() for i, v in pairs(sub:GetChildren()) do if v:isA("BasePart") then v.Anchored = true end end sub.Parent = viewportFrame end)
i get an error that Sub is nil, I substituted char with baseplate and it worked perfectly, so the fact char is nil is the problem. I don't know what in particular I did wrong