Raycast Hitbox 4.01: For all your melee needs!

V.3.0 Stable

Wow, another update, so soon??!

This update employs a bunch of rewrites in the MainHandler and Hitbox APIs, making its performance costs almost unnoticeable! There is also a new feature, which I like to call “Hit Distinction”! Take a look at some of these quick benchmarks I’ve made:

Raycast Module 2.3 Performance

NEW Raycast Module 3.0 Performance

New Feature: Hit Distinction

You can now tag your raycast points with specific group names! Using this group names, you can code in logic that can do different things depending on where the weapon hit! Instructions on how to do so can be found here:

No more disconnecting OnHit!

This is pretty big, especially for people who are new to scripting or just does not know.

Before, if you wanted to use OnHit in a new thread, you had to make sure to disconnect it like so:

function newThread()
     local newConn
     newConn = Hitbox.OnHit:Connect(function(hit, human)
          human:TakeDamage(10)
     end)
     wait(5)
     newConn:Disconnect()
end

Now you can be a bit more careless and use Hitbox.OnHit anywhere, in loops, new threads, whatever! The event uses a new minimalistic coroutine system that ensures only one connection line can be active at one time.

41 Likes