Hello!
My Question is: How Is it possible to make the player Punch
the Idea is to set an Input using inputBegan such as "F", And once I click that
Input, The player should punch and if hes punch touches another Humanoid, It should damage it.
Thanks for Advance!
I'm not going to provide a full script as you have not made an attempt, but you would use animations and a touched event.
Let's start you off with UserInputService, then you can check the developer Forum for more information.
You would use a local script to listen for the input, then a remote event to fire the request to the server
01 | local UserInputService = game:GetService( "UserInputService" ) |
02 |
03 |
04 | UserInputService.InputBegan:Connect( function (Input, Event) |
05 |
06 | if Event then return end |
07 | if Input.KeyCode = = Enum KeyCode.F then |
08 |
09 | --Your code here |
10 | end |
11 | end ) |
Here are some links that you need to check out
[(http://developer.roblox.com/en-us/api-reference/event/BasePart/Touched)]
[(http://developer.roblox.com/en-us/articles/Remote-Functions-and-Events)]