Im trying to make a character selector that show what character your currently using, and the viewport frame shows nothing.
local selected = script.Parent.Parent:WaitForChild("Selected")
local cam = Instance.new("Camera", script.Parent)
cam.CameraType = "Scriptable"
local characters = script.Parent:WaitForChild("UiCharacters")
local rotValue = 0
selected.Changed:Connect(function(value)
if value == "Naruto" then
print("Value is naruto")
game:GetService("RunService").RenderStepped:Connect(function()
local humRoot = characters.Naruto["Naruto Pts"].HumanoidRootPart
local cframe = humRoot.CFrame * CFrame.Angles(0, math.rad(rotValue), 0) * CFrame.new(0,0,5)
cam.CFrame = CFrame.new(cframe.p, humRoot.Position)
rotValue = rotValue + 1
print("Rotating")
end)
end
end)``` Im getting no errors