20:14:22.111  CameraCTR is not a valid member of StarterGui "StarterGui"  -  Client
  20:14:22.112  Stack Begin  -  Studio
  20:14:22.112  Script '-- =============================================
-- إنشاء واجهة المستخدم
-- =============================================
local CameraCTR = Instance.new("ScreenGui")
CameraCTR.Name = "CameraCTR"
CameraCTR.Parent = game.Players.LocalPlaye', Line 59  -  Studio
  20:14:22.112  Stack End  -  Studio

-- =============================================
-- إنشاء واجهة المستخدم
-- =============================================
local CameraCTR = Instance.new("ScreenGui")
CameraCTR.Name = "CameraCTR"
CameraCTR.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
CameraCTR.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
-------------------------------
local PhotoPlayerOne = Instance.new("Frame")
local ViewportFrame = Instance.new("ViewportFrame")
local UICorner = Instance.new("UICorner")
local BigParnetFrame = Instance.new("Frame")
local Framesmall = Instance.new("Frame")
local UICorner_2 = Instance.new("UICorner")
local SetPinFrameButton = Instance.new("TextButton")
local UICorner_3 = Instance.new("UICorner")
local CameraShotClose = Instance.new("TextButton")
local UICorner_4 = Instance.new("UICorner")
local UIListLayout = Instance.new("UIListLayout")
local UIPadding = Instance.new("UIPadding")
local CameraCinematicFollowInPl = Instance.new("TextButton")
local UICorner_5 = Instance.new("UICorner")
local CameraCinematicOutdoor = Instance.new("TextButton")
local UICorner_6 = Instance.new("UICorner")
local CameraCinematic3Shot = Instance.new("TextButton")
local UICorner_7 = Instance.new("UICorner")
local StopCameraAn = Instance.new("TextButton")
local UICorner_8 = Instance.new("UICorner")
local Xbuttonexit = Instance.new("TextButton")
local UICorner_9 = Instance.new("UICorner")
local CRightButton = Instance.new("TextButton")
local UICorner_10 = Instance.new("UICorner")
local CnamePlayer = Instance.new("TextLabel")
local UICorner_11 = Instance.new("UICorner")
local CLefttButton = Instance.new("TextButton")
local UICorner_12 = Instance.new("UICorner")
local ImagePlayerCT = Instance.new("ImageLabel")
local UICorner_13 = Instance.new("UICorner")

-- Properties

CameraCTR.Name = "CameraCTR"
CameraCTR.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
CameraCTR.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

PhotoPlayerOne.Name = "PhotoPlayerOne"
PhotoPlayerOne.Parent = CameraCTR
PhotoPlayerOne.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
PhotoPlayerOne.BackgroundTransparency = 1
PhotoPlayerOne.BorderColor3 = Color3.new(0, 0, 0)
PhotoPlayerOne.BorderSizePixel = 0
PhotoPlayerOne.Position = UDim2.new(0.64003849, 0, 0.0925644934, 0)
PhotoPlayerOne.Size = UDim2.new(0, 239, 0, 373)
PhotoPlayerOne.Visible = false

ViewportFrame.BackgroundColor3 = Color3.new(1, 1, 1)
ViewportFrame.BorderSizePixel = 0
ViewportFrame.BorderColor3 = Color3.new(0, 0, 0)
ViewportFrame.CurrentCamera = game.StarterGui.CameraCTR.PhotoPlayerOne.ViewportFrame.CameraSt
ViewportFrame.Parent = PhotoPlayerOne
ViewportFrame.Position = UDim2.new(0.0289999992, 0, 0.0309999995, 0)

UICorner.Parent = ViewportFrame
UICorner.CornerRadius = UDim.new(0, 15)

BigParnetFrame.Name = "BigParnetFrame"
BigParnetFrame.Parent = CameraCTR
BigParnetFrame.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
BigParnetFrame.BackgroundTransparency = 1
BigParnetFrame.BorderColor3 = Color3.new(0, 0, 0)
BigParnetFrame.BorderSizePixel = 0
-- BigParnetFrame.Position = UDim2.new(0.0404234827, 0, 0.0652503818, 0)
BigParnetFrame.Position = UDim2.new(0.8, 0, 0.065, 0)
BigParnetFrame.Size = UDim2.new(0, 247, 0, 577)

Framesmall.Name = "Framesmall"
Framesmall.Parent = BigParnetFrame
Framesmall.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
Framesmall.BorderColor3 = Color3.new(0, 0, 0)
Framesmall.BorderSizePixel = 0
Framesmall.Position = UDim2.new(0.015708521, 0, -0.00432408182, 0)
Framesmall.Size = UDim2.new(0, 247, 0, 475)

UICorner_2.Parent = Framesmall
UICorner_2.CornerRadius = UDim.new(0, 15)

SetPinFrameButton.Name = "SetPinFrameButton"
SetPinFrameButton.Parent = Framesmall
SetPinFrameButton.BackgroundColor3 = Color3.new(0.670588, 0.890196, 1)
SetPinFrameButton.BorderColor3 = Color3.new(0, 0, 0)
SetPinFrameButton.BorderSizePixel = 0
SetPinFrameButton.Position = UDim2.new(0.0931174085, 0, 0.121317156, 0)
SetPinFrameButton.Size = UDim2.new(0, 200, 0, 50)
SetPinFrameButton.Font = Enum.Font.SourceSans
SetPinFrameButton.Text = "Set Camera Player In Frame"
SetPinFrameButton.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
SetPinFrameButton.TextSize = 14

UICorner_3.Parent = SetPinFrameButton
UICorner_3.CornerRadius = UDim.new(0, 15)

CameraShotClose.Name = "CameraShotClose"
CameraShotClose.Parent = Framesmall
CameraShotClose.BackgroundColor3 = Color3.new(0.670588, 0.670588, 1)
CameraShotClose.BorderColor3 = Color3.new(0, 0, 0)
CameraShotClose.BorderSizePixel = 0
CameraShotClose.Position = UDim2.new(0.0931174085, 0, 0.240901217, 0)
CameraShotClose.Size = UDim2.new(0, 200, 0, 50)
CameraShotClose.Font = Enum.Font.SourceSans
CameraShotClose.Text = "Camera Shot Close"
CameraShotClose.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
CameraShotClose.TextSize = 14

UICorner_4.Parent = CameraShotClose
UICorner_4.CornerRadius = UDim.new(0, 15)

UIListLayout.Parent = Framesmall
UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0, 5)

UIPadding.Parent = Framesmall
UIPadding.PaddingTop = UDim.new(0.25, 0)

CameraCinematicFollowInPl.Name = "CameraCinematicFollowInPl"
CameraCinematicFollowInPl.Parent = Framesmall
CameraCinematicFollowInPl.BackgroundColor3 = Color3.new(0.670588, 0.890196, 1)
CameraCinematicFollowInPl.BorderColor3 = Color3.new(0, 0, 0)
CameraCinematicFollowInPl.BorderSizePixel = 0
CameraCinematicFollowInPl.Position = UDim2.new(0.0931174085, 0, 0.240901217, 0)
CameraCinematicFollowInPl.Size = UDim2.new(0, 200, 0, 50)
CameraCinematicFollowInPl.Font = Enum.Font.SourceSans
CameraCinematicFollowInPl.Text = "Camera Cinematic Indoor"
CameraCinematicFollowInPl.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
CameraCinematicFollowInPl.TextSize = 14

UICorner_5.Parent = CameraCinematicFollowInPl
UICorner_5.CornerRadius = UDim.new(0, 15)

CameraCinematicOutdoor.Name = "CameraCinematicOutdoor"
CameraCinematicOutdoor.Parent = Framesmall
CameraCinematicOutdoor.BackgroundColor3 = Color3.new(0.670588, 0.670588, 1)
CameraCinematicOutdoor.BorderColor3 = Color3.new(0, 0, 0)
CameraCinematicOutdoor.BorderSizePixel = 0
CameraCinematicOutdoor.Position = UDim2.new(0.0931174085, 0, 0.240901217, 0)
CameraCinematicOutdoor.Size = UDim2.new(0, 200, 0, 50)
CameraCinematicOutdoor.Font = Enum.Font.SourceSans
CameraCinematicOutdoor.Text = "Camera Cinematic Outdoor"
CameraCinematicOutdoor.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
CameraCinematicOutdoor.TextSize = 14

UICorner_6.Parent = CameraCinematicOutdoor
UICorner_6.CornerRadius = UDim.new(0, 15)

CameraCinematic3Shot.Name = "CameraCinematic3Shot"
CameraCinematic3Shot.Parent = Framesmall
CameraCinematic3Shot.BackgroundColor3 = Color3.new(0.670588, 0.890196, 1)
CameraCinematic3Shot.BorderColor3 = Color3.new(0, 0, 0)
CameraCinematic3Shot.BorderSizePixel = 0
CameraCinematic3Shot.Position = UDim2.new(0.0931174085, 0, 0.240901217, 0)
CameraCinematic3Shot.Size = UDim2.new(0, 200, 0, 50)
CameraCinematic3Shot.Font = Enum.Font.SourceSans
CameraCinematic3Shot.Text = "Camera Cinematic 3 Shot"
CameraCinematic3Shot.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
CameraCinematic3Shot.TextSize = 14

UICorner_7.Parent = CameraCinematic3Shot
UICorner_7.CornerRadius = UDim.new(0, 15)

StopCameraAn.Name = "StopCameraAn"
StopCameraAn.Parent = Framesmall
StopCameraAn.BackgroundColor3 = Color3.new(0.670588, 0.670588, 1)
StopCameraAn.BorderColor3 = Color3.new(0, 0, 0)
StopCameraAn.BorderSizePixel = 0
StopCameraAn.Position = UDim2.new(0.0931174085, 0, 0.240901217, 0)
StopCameraAn.Size = UDim2.new(0, 200, 0, 50)
StopCameraAn.Font = Enum.Font.SourceSans
StopCameraAn.Text = "Stop Camera"
StopCameraAn.TextColor3 = Color3.new(0.152941, 0.152941, 0.227451)
StopCameraAn.TextSize = 14

UICorner_8.Parent = StopCameraAn
UICorner_8.CornerRadius = UDim.new(0, 15)

Xbuttonexit.Name = "Xbuttonexit"
Xbuttonexit.Parent = BigParnetFrame
Xbuttonexit.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.498039)
Xbuttonexit.BorderColor3 = Color3.new(0, 0, 0)
Xbuttonexit.BorderSizePixel = 0
Xbuttonexit.Position = UDim2.new(1.0421052, 0, 0, 0)
Xbuttonexit.Size = UDim2.new(0, 35, 0, 40)
Xbuttonexit.Font = Enum.Font.FredokaOne
Xbuttonexit.Text = "X"
Xbuttonexit.TextColor3 = Color3.new(1, 1, 1)
Xbuttonexit.TextScaled = true
Xbuttonexit.TextSize = 14
Xbuttonexit.TextWrapped = true

UICorner_9.Parent = Xbuttonexit
UICorner_9.CornerRadius = UDim.new(0, 50)

CRightButton.Name = "CRightButton"
CRightButton.Parent = BigParnetFrame
CRightButton.BackgroundColor3 = Color3.new(0.670588, 0.670588, 1)
CRightButton.BorderColor3 = Color3.new(0, 0, 0)
CRightButton.BorderSizePixel = 0
CRightButton.Position = UDim2.new(0.781376541, 0, 0.0797227025, 0)
CRightButton.Size = UDim2.new(0, 34, 0, 37)
CRightButton.Font = Enum.Font.SourceSans
CRightButton.Text = ">"
CRightButton.TextColor3 = Color3.new(0, 0, 0)
CRightButton.TextSize = 14

UICorner_10.Parent = CRightButton
UICorner_10.CornerRadius = UDim.new(0, 50)

CnamePlayer.Name = "CnamePlayer"
CnamePlayer.Parent = BigParnetFrame
CnamePlayer.BackgroundColor3 = Color3.new(0.45098, 0.45098, 0.670588)
CnamePlayer.BorderColor3 = Color3.new(0, 0, 0)
CnamePlayer.BorderSizePixel = 0
CnamePlayer.Position = UDim2.new(0.283728719, 0, 0.0690000057, 0)
CnamePlayer.Size = UDim2.new(0, 113, 0, 50)
CnamePlayer.Font = Enum.Font.SourceSans
CnamePlayer.Text = "Name Player"
CnamePlayer.TextColor3 = Color3.new(1, 1, 1)
CnamePlayer.TextSize = 14

UICorner_11.Parent = CnamePlayer
UICorner_11.CornerRadius = UDim.new(0, 15)

CLefttButton.Name = "CLefttButton"
CLefttButton.Parent = BigParnetFrame
CLefttButton.BackgroundColor3 = Color3.new(0.670588, 0.670588, 1)
CLefttButton.BorderColor3 = Color3.new(0, 0, 0)
CLefttButton.BorderSizePixel = 0
CLefttButton.Position = UDim2.new(0.109311745, 0, 0.0797227025, 0)
CLefttButton.Size = UDim2.new(0, 34, 0, 37)
CLefttButton.Font = Enum.Font.SourceSans
CLefttButton.Text = "<"
CLefttButton.TextColor3 = Color3.new(0, 0, 0)
CLefttButton.TextSize = 14

UICorner_12.Parent = CLefttButton
UICorner_12.CornerRadius = UDim.new(0, 50)

ImagePlayerCT.Name = "ImagePlayerCT"
ImagePlayerCT.Parent = BigParnetFrame
ImagePlayerCT.BackgroundColor3 = Color3.new(1, 1, 1)
ImagePlayerCT.BorderColor3 = Color3.new(0, 0, 0)
ImagePlayerCT.BorderSizePixel = 0
ImagePlayerCT.Position = UDim2.new(0.400809705, 0, -0.045060657, 0)
ImagePlayerCT.Size = UDim2.new(0, 54, 0, 54)
ImagePlayerCT.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"

UICorner_13.Parent = ImagePlayerCT
UICorner_13.CornerRadius = UDim.new(0, 50)

-- The rest of your script here
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local CameraCTR = script.Parent
local currentPlayerIndex = 1
local lastTween = nil
local cameraMovements = {
    ["CameraCinematicFollowInPl"] = {
        startPos = {48.004, 5.505, 463.989},
        startRot = {-8.662, -149.596, 0},
        endPos = {52.106, 4.532, 473.54},
        endRot = {-13.763, -131.994, 0}
    },
    ["CameraCinematicOutdoor"] = {
        startPos = {20.163, 15.059, 444.785},
        startRot = {-13.763, -131.994, 0},
        endPos = {51.89, 4.694, 473.381},
        endRot = {-16.462, -131.195, 0}
    },
    ["CameraShotClose"] = {
        startPos = {62.548, 5.61, 466.545},
        startRot = {-7.761, 158.006, 0},
        endPos = {58.318, 4.07, 477.019},
        endRot = {-7.761, 158.006, 0}
    },
    ["CameraCinematic3Shot"] = {
        angles = {
            {62.789, 3.602, 472.822, -6.561, 132.006, 0},
            {65.034, 3.821, 478.926, -7.76, 87.197, 0},
            {62.496, 3.821, 483.961, -7.76, 45.599, 0}
        }
    }
}

local function updatePlayerInfo(player)
    local playerGui = Players.LocalPlayer.PlayerGui
    local playerImage = playerGui:FindFirstChild("ImagePlayerCT")
    local playerName = playerGui:FindFirstChild("CnamePlayer")
    if player then
        playerImage.Image = player.CharacterAppearanceId
        playerName.Text = player.Name
    else
        playerImage.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
        playerName.Text = "No Player"
    end
end

local function adjustCoordinatesToPlayer(player, coords)
    local character = player.Character
    if character and character:FindFirstChild("Head") then
        local head = character.Head
        local headCFrame = head.CFrame
        local relativeOffset = CFrame.new(coords[1], coords[2], coords[3]) * CFrame.fromEulerAnglesXYZ(math.rad(coords[4]), math.rad(coords[5]), math.rad(coords[6]))
        return (headCFrame * relativeOffset).Position, headCFrame:ToEulerAnglesYXZ()
    end
    return nil, nil
end

local function moveCamera(player, buttonName)
    local camera = workspace.CurrentCamera
    local camInfo = cameraMovements[buttonName]
    if camInfo then
        if buttonName == "CameraCinematic3Shot" then
            local tweenInfo = TweenInfo.new(15, Enum.EasingStyle.Sine)
            for i, angle in ipairs(camInfo.angles) do
                local pos, rot = adjustCoordinatesToPlayer(player, angle)
                if pos and rot then
                    local tween = TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(pos) * CFrame.fromEulerAnglesYXZ(rot[1], rot[2], rot[3])})
                    tween:Play()
                    tween.Completed:Wait()
                end
            end
        else
            local startPos, startRot = adjustCoordinatesToPlayer(player, camInfo.startPos)
            local endPos, endRot = adjustCoordinatesToPlayer(player, camInfo.endPos)
            if startPos and startRot and endPos and endRot then
                local tweenInfo = TweenInfo.new(15, Enum.EasingStyle.Sine)
                local tween = TweenService:Create(camera, tweenInfo, {CFrame = CFrame.new(endPos) * CFrame.fromEulerAnglesYXZ(endRot[1], endRot[2], endRot[3])})
                tween:Play()
                lastTween = tween
            end
        end
    end
end

CameraCTR.CRightButton.MouseButton1Click:Connect(function()
    currentPlayerIndex = (currentPlayerIndex % #Players:GetPlayers()) + 1
    updatePlayerInfo(Players:GetPlayers()[currentPlayerIndex])
end)

CameraCTR.CLefttButton.MouseButton1Click:Connect(function()
    currentPlayerIndex = (currentPlayerIndex - 2 + #Players:GetPlayers()) % #Players:GetPlayers() + 1
    updatePlayerInfo(Players:GetPlayers()[currentPlayerIndex])
end)

for _, buttonName in pairs({"CameraCinematicFollowInPl", "CameraCinematicOutdoor", "CameraShotClose", "CameraCinematic3Shot"}) do
    local button = CameraCTR:FindFirstChild(buttonName)
    if button then
        button.MouseButton1Click:Connect(function()
            if lastTween then lastTween:Cancel() end
            local player = Players:GetPlayers()[currentPlayerIndex]
            moveCamera(player, buttonName)
        end)
    end
end

CameraCTR.StopCameraAn.MouseButton1Click:Connect(function()
    if lastTween then lastTween:Cancel() end
    workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)

updatePlayerInfo(Players:GetPlayers()[currentPlayerIndex])