I'm really confused, I have no idea how to do it, could anyone help me out?
Code:
local uis = game:GetService("UserInputService")
local p = game.Players.LocalPlayer
local character = p.Character
local m = p:GetMouse()
uis.InputBegan:Connect(function(keyCode)
if keyCode.keyCode == Enum.KeyCode.B then
local newpart = Instance.new("Part", workspace)
newpart.Name = "test"
newpart.Position = m.Hit
end
end)
