You will have to follow instructions. Its not a drag and drop. It works in all environment, be it server or client.
EDIT: fixed it! Iām no longer destroying the hitbox when unequipped, and creating it before anything else. If this isnāt the preferred method, please let me know
Iām having an issue when an user quickly equips & unequipps a weapon using this module, while using the weapon. The variable āHitboxā turns to nil, and I get this error output:
Players.Untethered.Backpack.Sword.SwordScript:78: attempt to call a nil value
I was able to replicate this issue in the showcase Example Place in the original post of this thread. The error shown on that example place is this:
Players.Untethered.Backpack.ClassicSword.SwordScript:135: attempt to call a nil value
This is specifically within this function from the Sword script in the example place.
function Attack()
Damage = DamageValues.SlashDamage
Sounds.Slash:Play()
if Humanoid then
if Humanoid.RigType == Enum.HumanoidRigType.R6 then
local Anim = Instance.new("StringValue")
Anim.Name = "toolanim"
Anim.Value = "Slash"
Anim.Parent = Tool
elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
local Anim = Tool:FindFirstChild("R15Slash")
if Anim then
local Track = Humanoid:LoadAnimation(Anim)
Track:Play(0)
end
end
end
wait(0.2)
Hitbox:HitStop()
end
Specifically, in the Hitbox:HitStop() line.
What can I do to work around this issue? Iām a bit stuck here
Hi, Iām having an issue with the RayCastHitBox. okay, so the issue is that I canāt detect the anchored part. for example, when I used my sword on a wall that is anchored, It wonāt detect anything.
Everyone, after I call Hitbox:HitStart(1)ļ¼ do I need to wait for an event before calling Hitbox:Destroy() to reduce memory
This can be used for ranged attacks as well right? Whenever we delete the projectile we can delete the hitbox and done.
Does the hitbox detect Terrain? If you wanted a tentacle to create a splash effect when colliding with terrain water, would that be possible?
Replicate the hitboxes from the client, then send the hit data to the server. This fixed the problem for me
activate hitboxes from the client.
a guy told me that the hitbox will be messy when the animation is ran clientsided, he didnt mention abt this tho, ill try it out
sorry, I should have been more specific. Activate the hitbox from the client then send the hit data to the server
Will the exploiter use hitbox extender >:(
i may be answering my own question by why not play the animation in a serverscript and make a local variable that becomes a connection instead of making it play on both local and serverscripts?
Its hard to do this, because you need to adjust the attachments position. You could add a check, and if the attachment has moved, kick the player or even move it back. You would have to do this with Position And NOT world position
I donāt think this would work. But even if it did, you would still have the problem with client delays. To sum it up try swinging while the player is walking, then you will see that the hitbox is far behind
This is similar to ClientCast:
ClientCast - A Client-based, Idiosyncratic Hitbox System! - Resources / Community Resources - DevForum | Roblox
Edit: I donāt believe Raycast Hitbox would replicate from client only ClientCast does
I have done this to the weapons in my game as well, It works perfectly fine.
Edit: I only realised what you meant about the exploiter prevention, didnāt even know that ClientCast was a thing until you showed me it. Thanks
ClientCast has easier exploiter prevention if you set the ClientCasterās owner to a client
Example:
Caster.Collided:Connect(function(Data)
if (Data.Position - Caster.Object.Position).Magnitude > 5 then
return print("very likely an exploiter")
end
end)
Ah, I see, so i make the hitbox on the client, and then when the animation has reached the keyframe i do onclientevent and then start the hitbox?