RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script when i press q a part spawns"
-- local script local UserInputService = game:GetService("UserInputService") function onInputBegan(input, gameProcessed) if input.KeyCode == Enum.KeyCode.Q and not gameProcessed then local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local part = Instance.new("Part") part.Size = Vector3.new(5, 5, 5) part.Position = character.HumanoidRootPart.Position + Vector3.new(0, 10, 0) part.Parent = workspace end end UserInputService.InputBegan:Connect(onInputBegan)