I am trying to make a crouch script for a fps. The camera is supposed to move down and up depending if they are crouching or not.
mouse.KeyDown:Connect(function(key)
if key == "c" and crouching == 1 then
crouching = 2
h.WalkSpeed = h.WalkSpeed - 15
h.JumpPower = h.JumpPower - 60
playAnim:Play()
cam.CFrame = cam.CFrame - Vector3.new(0,5,0)
script.Parent.CrouchNonfication.Text = "Crouching"
crouching = 3
elseif key == "c" and crouching == 3 then
crouching = 2
h.WalkSpeed = h.WalkSpeed + 15
if p.Perk.Value == "Kangaroo" then
h.JumpPower = 60
else
h.JumpPower = 40
end
cam.CFrame = cam.CFrame + Vector3.new(0,5,0)
playAnim:Stop()
script.Parent.CrouchNonfication.Text = ""
crouching = 1
end
end)
end

6 comments
Correct me if I'm wrong, but doesn't the camera need to be in "Scriptable" in order to be changed by a script?
you may he on to something
Did that ever fix it?
rip i forgot ill do it rn
yeah! youre right
nvm now it stays there