
2.5k Views
76 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
😱
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera
local observing = false
local currentIndex = 1
local otherPlayers = {}
-- تحديث قائمة اللاعبين الآخرين
local function updateOtherPlayers()
otherPlayers = {}
for _, player in ipairs(Players:GetPlayers()) do
if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
table.insert(otherPlayers, player)
end
end
end
-- تفعيل/إلغاء تفعيل وضع المراقبة
local function toggleCamera()
if not observing then
updateOtherPlayers()
if #otherPlayers > 0 then
observing = true
currentIndex = 1
camera.CameraSubject = otherPlayers[currentIndex].Character:FindFirstChild("Humanoid")
end
else
observing = false
camera.CameraSubject = localPlayer.Character and localPlayer.Character:FindFirstChild("Humanoid") or localPlayer
end
end
-- عند الضغط على J
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.J then
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







