RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make the player be able to crawl"
-- local script local player = game:GetService("Players").LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local UserInputService = game:GetService("UserInputService") local isCrawling = false local function toggleCrawl() if isCrawling then isCrawling = false humanoid.WalkSpeed = 16 humanoid.JumpPower = 50 character.HumanoidRootPart.Anchored = false character.HumanoidRootPart.CFrame = character.HumanoidRootPart.CFrame + Vector3.new(0, 1, 0) else isCrawling = true humanoid.WalkSpeed = 6 humanoid.JumpPower = 0 character.HumanoidRootPart.Anchored = true character.HumanoidRootPart.CFrame = character.HumanoidRootPart.CFrame - Vector3.new(0, 1, 0) end end UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) if input.KeyCode == Enum.KeyCode.C and not gameProcessedEvent then toggleCrawl() end end)