Camera Bug on Spawn

Okay so the camera works fine but a recent issue that’s cropped us is when I spawn in the camera seems to lock/freeze and the only fix is if you respawn your character, I’ll show some examples below.

Example of the bug: https://gyazo.com/94ec4dd39361acbe3feca6a92dd409f0
Example of how camera should be: https://gyazo.com/f80e869d123b2f667629190c28f32438

Any help would be greatly appreciated, thank you!

2 Likes

Is the camersubject the humaoid? and cameratype “Custom”?

2 Likes

Is the camera type being set to Scriptable on spawn, somewhere? Try search all scripts.

2 Likes

Yup. Works fine on respawn so already is subject to it, also this bug only happens on the website, it works fine in studio idk why?

1 Like

Yeah it is, is that what is needed to fix it?

1 Like

ServerScript under ServerScriptService:

local camera = workspace.CurrentCamera

game.Players.PlayerAdded:Connect(function(Player)

    if not camera.CameraType = Enum.CameraType.Custom then
        camera.CameraType = Enum.CameraType.Custom
        return
    end

    if not camera.CameraSubject = Player.Character:WaitForChild("Humanoid") then
        camera.CameraSubject = Player.Character:WaitForChild("Humanoid")
        return
    end

That should work, but it may interfere with camera manipulation which you may have.

1 Like

Omg you are a legend, thank you so much that worked perfectly :smiley:

1 Like

Ah, don’t you love miracle workers? :innocent:

2 Likes

yeah this works but what is this black magic, it should not work, is this making an error on purpose so the scripts are delayed?

Edit: yeah its 100% a error meant to delay the other scripts.

There were no initial errors, it’s just some script was setting a camera/locking it to a certain position/subject. Also, it should work perfectly, setting both of the camera settings sets everything just to the player.

1 Like

yeah well it seems to work when giving out an error and seems to not work when it does not give one out, this can be fixed by having a main menu that resets the character as soon as they click play which was intended at the start so we might as well do it now.

If it worked, it worked. Let’s not argue over a solution. I do realize I made a slight mistake, the if statements should’ve had ==, but I’m sure they caught the mistake and changed it, otherwise it would error as stated.

1 Like

i know they caught it because i am the scripter of the game and im just confused on why it works, so we just gonna have a main menu so we get no errors, thanks for the help