game:GetService("RunService").RenderStepped:Connect(function()
if game:GetService("ReplicatedStorage").Values.FocusVillage.Value then
local village
for i,v in pairs(game.Workspace.Villages:GetChildren()) do if v.Name == game.Players.LocalPlayer.Name then village = v end end
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Track
game.Workspace.CurrentCamera.CameraSubject = village.CamPart
else
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = game.Workspace.TopDownCamera.CFrame
end
end)

the camera just stays as the cframe shown above, even when cameratype and camerasubject have changed to track a part
1 Like
game:GetService("ReplicatedStorage").Values.FocusVillage.Changed:Connect(function(Change)
if Change == true then
local village
for i,v in pairs(game.Workspace.Villages:GetChildren()) do
if v.Name == game.Players.LocalPlayer.Name then
village = v
end
end
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Track
game.Workspace.CurrentCamera.CameraSubject = village.CamPart
game.Workspace.CurrentCamera.CFrame = village.CamPart.CFrame
else
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = game.Workspace.TopDownCamera.CFrame
end
end)

this happens. i was looking for the camera being able to orbit around via mouse like a normal player camera
everything i tried hasnt worked. any other solutions?
After disabling the script, the camera no longer works at all. It also does not focus on any other part. Could it be a studio bug? If so, how do I fix it?