RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a script that makes the player roll forward when the player press Q"
-- local script local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local function onInputBegan(input, gameProcessedEvent) if input.KeyCode == Enum.KeyCode.Q and not gameProcessedEvent then humanoid:ChangeState(Enum.HumanoidStateType.Rolling) end end UserInputService.InputBegan:Connect(onInputBegan)