How to fix while i ragdoll and turn my camera while shiftlock it fling

I want this : while i ragdoll make the character not turn while shiftlock but camera still turn

3 Likes

i dont get what ur saying… can you explain urself better or make an exaple please?

2 Likes

Please post the script you are using so we can see how you are trying to do it now.
Also put 3 backticks (```) before and after the script so it formats it properly and makes it easy to read.

2 Likes

Set an attribute or value to the player and call it for example PlayerRagdolled, when it is enabled/true, the CameraSubject will be equal to the players head, which will make it so that they cant rotate their camera

Character:SetAttribute("Ragdolled", false)

or if you want it as a bool value

local Ragdolled = Instance.new("BoolValue", Character)
Ragdolled.Name = "Ragdolled"
Ragdolled.Value = false

then the camera

Character:GetAttributeChangedSignal("Ragdolled"):Connect(function()
 if Character:GetAttribute("Ragdolled") == true then
  camera.CameraSubject = Character.Head
 else
  camera.CameraSubject = Character:WaitForChild("Humanoid")
 end
end)

or if you’re using a bool

Character:WaitForChild("Ragdolled").Changed:Connect(function()
 if Character.Ragdolled.Value == true then
  camera.CameraSubject = Character.Head
 else
  camera.CameraSubject = Character:WaitForChild("Humanoid")
 end
end)
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.