You can write your topic however you want, but you need to answer these questions:
-
Trying to set the camera subject
-
It’s not setting it
-
I have looked for solutions on the Developer Hub
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local starterCharacter = ReplicatedStorage:WaitForChild("StarterCharacter")
local Camera = game.Workspace.CurrentCamera
local players = Players:GetPlayers()
for i, player in ipairs(players) do
if i <= 2 then
if player.Character then
player.Character:Destroy()
local newCharacter = starterCharacter:Clone()
newCharacter.Name = player.Name
newCharacter.Parent = workspace
player.Character = newCharacter
wait(2)
Camera.CameraSubject = game.Workspace[player.Name]:FindFirstChildWhichIsA("Humanoid")
end
end
end
Does anyone know why this is happening please help me, thanks.