I want to have the camera follow a humanoid after the character loads. I have team selection in my game and after the player chooses a team the character loads. There are character models in ReplicatedStorage
that clone when the player selects a team and replaces the default player’s character with a custom character. I created a local script in StarterPlayerScripts
that has the camera switched to the new character. It doesn’t switch. The camera just doesn’t change its position.
I set up characterautoloads = false
. However, the camera subject changes to humanoid and the camera type changes from scriptable to custom. When I change the camera subject to humanoid in the explorer, the properties of the camera also don’t work. What can I do? My local script:
local player = game:GetService("Players").LocalPlayer
local camerapart = game.Workspace.CameraPart
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = camerapart.CFrame
player.CharacterAdded:Connect(function()
camera.CameraSubject = player.Character:WaitForChild("Humanoid")
camera.CameraType = Enum.CameraType.Custom
end)
I was trying to fix this, I was looking for a solution to this problem but I didn’t find it.
0