I’m using V1 of raycasthitbox, and everytime I call to create a hitbox on the server using the V4 version after which an animation is finished the hitbox is destroyed but the V1 on client also breaks rendering useless unless player re-equips.
This is how I create the hitbox on the client (the one that breaks).
_Tools.Tool = Tool
_Tools.CurrentHitbox = RaycastHitbox:Initialize(GetHandle(Tool), {Player.Character})
_Tools.CurrentHitbox:DebugMode(Player:GetAttribute("_debug_setting"))
The server.
local Raycast = RaycastParams.new()
Raycast.FilterDescendantsInstances = {Character}
Raycast.FilterType = Enum.RaycastFilterType.Exclude
local Hitbox = GetHandle(Tool, Character)
Hitbox.RaycastParams = Raycast
local Module = require(_G.GetM(Tool))
if Module.NoExecute then
pcall(function()
Hitbox:Destroy() -- Example of the hitbox being destroyed on the server.
end)
Hitbox = nil
return
end