https://www.youtube.com/watch?v=dRGEAethTGA
Just replace the sword with a small block in front of the player's arm, make the part created by the script instead of as a tool, and profit. Oh and here's the Keypress syntax:
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.F then
print("F was pressed")
--Put your code stuff here
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress) |