#Advice needed to understand hitbox positioning issue

1 messages · Page 1 of 1 (latest)

feral knoll
#

So I'm trying to make a basic special attack where the first part of it spawns a hitbox infront of the players body when an animation marker is reached, to test if the hitbox was created accurately I made it so autorotate turns off when the hitbox spawns. Now if I do my move while not rotating it correctly spawns the hitbox infront of my body as seen in the first pic but if I'm rotating my camera around while trying to use it, I get locked in place by the autorotate in an orientation that doesnt match with the hitbox orientation, in the 2nd pic you can see im basically facing away from the hitbox , I thought a function like this where autorotate is set to false at the same time that the hitbox is created should always have the player orientation match with the hitbox creation no matter what, so how is it possible that this happens?

        SkillAnimation:GetMarkerReachedSignal("Hit1"):connect(function()
            local Hitbox = HitboxModule.CreateHitbox()
            Hitbox.Size = Vector3.new(4, 4, 4)
            Hitbox.Offset = CFrame.new(0, 0, -3)
            Hitbox.Shape = "Box"
            Hitbox.Char = Character
            Hitbox.Visualizer = true

            
            local HitService = HitServiceModule.new()
            HitService.PlayerChar = Character
            
            Hitbox.CFrame = hrp.CFrame
            print("Hit1")
            local HumsHit = Hitbox:Cast()
            Character.Humanoid.AutoRotate = false
            
            if #HumsHit == 0 then
                task.delay(0.2, function()
                    SkillAnimation:Stop()
                    task.delay(2, function()
                        Character.Humanoid.AutoRotate = true
                    end)

                end)
                return
            end
severe iris
#

but you can do some shenanigans with :GetNetworkPing() to get close

south wedge
severe iris
#

which would destroy the point of manipulating it in the first place

south wedge
#

@severe irisis there any resource for what roblox functions do under the hood or nah

#

I was looking for it and couldnt find

feral knoll
#

is roblox good enough against exploits yet to not need to validate it on the server after or naw

severe iris
#

No

#

you need a lot of sanity checks to have minimally exploitable client hitboxes