How do you want your grapple to behave? There are many types of grapples. It would help if you had an example from an existing game that shows how you want it.
You can also try a search, there are probably a few tutorials and examples of how to make grapples out there already.