RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"player roll system when players presses Q and plays animation"
-- local script local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rollAnimation = Instance.new("Animation") rollAnimation.AnimationId = "rbxassetid://your_animation_id_here" local function onInputBegan(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q and not gameProcessedEvent then local rollTrack = humanoid:LoadAnimation(rollAnimation) rollTrack:Play() end end UserInputService.InputBegan:Connect(onInputBegan)