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