I have this in a local script:
player = game.Players.LocalPlayer character = player.Character:Clone() character.PrimaryPart = character.Torso character:SetPrimaryPartCFrame(player.Character.Torso.CFrame) game.Workspace.CurrentCamera.CameraSubject = character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom"
It's supposed to clone the player, then move the camera to the clone. None of this works, for some reason.
Zerio, your comment is simple to fix. Change CameraName to current workspace's camera name. Wiki: The center of help and bugs too. Well, guess what there is stuff for what we dont need wiki and we need. In this case, we don't
Let's see your code and point what i've found while reading it:
player = game.Players.LocalPlayer -- Good start, but remember to make it a local variable -- remember to make script a LocalScript character = player.Character:Clone() character.PrimaryPart = character.Torso character:SetPrimaryPartCFrame(player.Character.Torso.CFrame) game.Workspace.CurrentCamera.CameraSubject = character.Humanoid -- ... are you serious game.Workspace.CurrentCamera.CameraType = "Custom"
So, the player would look like this:
local player = game.Players.LocalPlayer
Well, by myself fixing this:
local player = game.Players.LocalPlayer -- let's replace CHARACTER mess with a model. modelm = Instance.new("Model", game.Workspace) -- For a player modelm.Name = player.Name -- This makes the PLAYER's Character model for _,item in pairs(player.Character:GetChildren()) do -- this will get every character item item:clone().Parent = modelm -- this works fine if item.ClassName == "Humanoid" then game.Workspace:findFirstChild("CameraName").CameraSubject = modelm.Humanoid end end game.Workspace:findFirstChild("CameraName").CameraType = Enum.CameraType.Custom
Hope this fixes your problem, Thanks, marcoantoniosantos3
As far as I can tell, you problem is that you never set character
's Parent to Workspace (or Workspace.CurrentCamera), so the Camera has nothing to attach to.