RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a tool in the player's hotbar that can use z x and c for skills"
-- LocalScript in StarterCharacterScripts local UserInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local tool = Instance.new("Tool", player.Backpack) tool.Name = "SkillTool" local function onKeyPress(input) local keyCode = input.KeyCode if keyCode == Enum.KeyCode.Z then print("Skill 1 activated") elseif keyCode == Enum.KeyCode.X then print("Skill 2 activated") elseif keyCode == Enum.KeyCode.C then print("Skill 3 activated") end end UserInputService.InputBegan:Connect(onKeyPress)