Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I correctly define the bounds of a Region3 for hitboxes?

Asked by 3 years ago

I've been trying to make a damaging hitbox, however, I keep getting the error "attempt to perform arithmetic (sub) on Instance and Vector 3." I set the region up like this

Rep.Events.Combat.OnServerEvent:Connect(function(Player, V1)
    local Region = Region3.new(V1-Vector3.new(3.2,2.1,3.5),V1+Vector3.new(3.2,2.1,5))
    local RTable = workspace:FindPartsInRegion3(Region, nil, 30)
    for i,v in pairs(RTable) do

0
Don't use region3's to make hitboxes. Here's a module for it instead: https://devforum.roblox.com/t/raycast-hitbox-update-3-3-for-all-your-melee-needs/374482 radiant_Light203 1166 — 3y

Answer this question