Its a local script in StarterCharacterScripts. Here is the script:
local NormalWalkSpeed = 16
local CrouchSpeed = 5
local AnimID = "rbxassetid://110238361848009"
local currentCamera = game.Workspace.CurrentCamera
local cas = game:GetService("ContextActionService")
local Leftc = Enum.KeyCode.LeftControl
local RightC = Enum.KeyCode.Z
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local CrouchAnim = Instance.new("Animation")
CrouchAnim.AnimationId = AnimID
local CAnim = Humanoid:LoadAnimation(CrouchAnim)
local Camera = game.Workspace.CurrentCamera
local TweenService = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(key, gameProcessed)
if gameProcessed then return end
if key.KeyCode == Enum.KeyCode.Z then
Humanoid.WalkSpeed = CrouchSpeed
Humanoid.JumpPower = 0
Humanoid.JumpHeight = 0
Humanoid.HipHeight -= 1.2 -- This line isnt working
CAnim:Play()
end
end)
UIS.InputEnded:Connect(function(key, gameProcessed)
if gameProcessed then return end
if key.KeyCode == Enum.KeyCode.Z then
Humanoid.WalkSpeed = NormalWalkSpeed
Humanoid.JumpPower = 0
Humanoid.JumpHeight = 0
Humanoid.HipHeight += 1.2 -- This line isnt working
CAnim:Stop()
end
end)