RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script if you press q it places a wall in front of you"
-- local script local player = game.Players.LocalPlayer local mouse = player:GetMouse() local function onKeyPress(actionName, userInputState, inputObject) if actionName == "Q" and userInputState == Enum.UserInputState.Begin then local wall = Instance.new("Part") wall.Parent = game.Workspace wall.Anchored = true wall.Size = Vector3.new(2, 10, 10) wall.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position + (mouse.Hit.lookVector * 5)) end end mouse.KeyDown:Connect(onKeyPress)