Client no longer sends Humanoid along with the HumanoidCollided remote, but rather the server verifies whether the instance has one or not when it receives the data.
Collided & HumanoidCollided events are now destroyed when the Caster object is destroyed.
RaycastResult.Instance is now checked for whether it’s nil or not if sent from the client.
if Attachment.ClassName == "Attachment" and Attachment.Name == Settings.AttachmentName and not DamagePoints[Attachment] then
I’m assuming what’s going on is that you somehow parented a Roblox-locked object as a child or descendant - be it by accidentally setting the model to game, workspace or similar, or by other black wizardry.
The only case in which such an error would occur is when attempting to index Roblox-locked objects.
Could you verify that the model, and it’s descendants, are expected - ie., that it’s not something like workspace or game? You can check by going to line 423 in the module, and adding a print(CasterObject.Object:GetFullName()) to see what the object is set to.
I was told in a tutorial to put the script in ServerScriptService and the module in ServerStorage (if I put it in replicatedstorage the same thing happens)
by “object”, I mean the object you set the ClientCaster’s hitbox as - ClientCast.new(**Object**)
Also, could you try adding a print as mentioned above?
Where would I put the print though? If I put it under the line it would obviously not work, and if I put it above it would work but I probably wouldn’t be able to see it since the output would be spammed with errors.
Is there a way to implement a feature to toggle debug for a specific client?
Say there’s a settings menu, I want a ‘Debug’ option that you can toggle on and off.
How do you make it so that the module’s rays are debugged by a specific client?
ClientCast is meant to be barebones so that you can easily implement this sort of functionality yourself. What I do for my game is have a simple if-statement check in the localscript where the raycast is done - you could easily setup a remote event to listen to the server, and then use attributes to tell the localscript when to visualize the raycasts.
How would I go about doing this? I can kind of put together what you’re saying but I wouldn’t know how to do that since I’m not really familiar with the module