I’m trying to make the players camera zoom out when they ragdoll so it doesn’t break my viewmodel, but it only works the first time I toggle it and then I have to manually zoom out for it to work. I have tried using a serverscript and a localscript and they both have the same result. Here is an example:
https://gyazo.com/c9e9bc5cf09f6a2fdec61a2a3320d0cd
Ignore the floating character, thats what happens when I ragdoll with the first person viewmodel, I have to manually zoom out with my mouse wheel for it to actually zoom out, but I want it to be automatic.
Here is the part that changes the characters zoom:
if ragdollState == "Ragdoll" then
char.RagdollTrigger.Value = true
plr.CameraMode = Enum.CameraMode.Classic
plr.CameraMinZoomDistance = 20
plr.CameraMaxZoomDistance = 20
elseif ragdollState == "UnRagdoll" then
char.RagdollTrigger.Value = false
plr.CameraMode = Enum.CameraMode.LockFirstPerson
plr.CameraMinZoomDistance = 0.5
plr.CameraMaxZoomDistance = 0.5
end
end)