Hitbox serverside issue with Position

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

To make fair hitbox for killer and survivor or try to recreate forsaken’s hitboxs

  1. What is the issue? Include screenshots / videos if possible!

sometime whenever i adjusted hitbox front of killer like this

this what cilent see

However when that was adjusted, the server sometime see this

image

  1. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
	local pingOffset = 8.6 - 10 * math.clamp(Player:GetNetworkPing(), 0, 0.3)

		local velocityOffset = hitbox.CFrame:VectorToObjectSpace(primaryPart.AssemblyLinearVelocity)

		hitbox.CFrame *= CFrame.new(velocityOffset / pingOffset)


  • this may solution but sometime it very inaccurate for serverside
    or i call it “temporary solution”

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local function CreateHitbox(Position,Last)
	
	
	
	
		 
		 
		 
		 
		local hitbox = Instance.new("Part",workspace.Hitbox)
        print("buble")

		hitbox.TopSurface = Enum.SurfaceType.Smooth
		hitbox.BottomSurface = Enum.SurfaceType.Smooth


		hitbox.Massless = true
		
		hitbox.Size = Size
		hitbox.CanCollide = false
		hitbox.Anchored = true
		hitbox.BrickColor = BrickColor.Red()
		hitbox.Transparency = 0.5
		hitbox.Material = Enum.Material.ForceField
		
		hitbox.CanQuery = false
		
	   hitbox.CFrame = Position
		
		
		local pingOffset = 8.6 - 10 * math.clamp(Player:GetNetworkPing(), 0, 0.3)

		local velocityOffset = hitbox.CFrame:VectorToObjectSpace(primaryPart.AssemblyLinearVelocity)

		hitbox.CFrame *= CFrame.new(velocityOffset / pingOffset)

		
		
		
		
		
		Debris:AddItem(hitbox,Last)
		return hitbox
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like