Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The player's camera subject isnt the morph?

Asked by 3 years ago

code:

script.Parent.Humanoid.Died:connect(function()
    local player = game.Players:GetPlayerFromCharacter(script.Parent)
    if player.Team == game.Teams.SCP then
        local Model = game.ReplicatedStorage["SCP 457"]:Clone()
        Model.Name = player.Name
        Model.Parent = workspace
        player.Character = Model
        while player.Team == game.Teams.SCP do --part that doesnt work
            wait()
            game.Workspace.CurrentCamera.CameraSubject = game.Workspace[player.Name].Head
            game.Workspace.CurrentCamera.CFrame = game.Workspace[player.Name].Head.CFrame
            end
    end
end)

1 answer

Log in to vote
3
Answered by
appxritixn 2235 Moderation Voter Community Moderator
3 years ago

As explained in the Roblox API, the camera is not replicated between the client and server. It also states that game.Workspace.CurrentCamera is "The Camera object being used by the local player."

With that being said, make sure you are handling the Camera from a LocalScript.

Ad

Answer this question