ClientCast - A Client-based, Idiosyncratic Hitbox System!

I tried out another viewmodel (with no fake/smaller arms) and weirdly enough, that worked perfectly fine. I believe that me changing the viewmodel’s collision group also had something to do with it.

In the end, I just scrapped the fake arms and just went with the same setup except I make the real arms transparent.

Thanks for replying!

Is it possible to use this for a tool and replace the .touched event with this? I also see that It doesn’t work without it moving so how can go around that?

So long the tool has DmgPoints, yes.
You can’t make it work without moving - raycasts require a direction with a magnitude greater than 0.

Is there a way to only enable debug on the owner client? I’ve tried some things and couldn’t get anything to work. Can’t seem to find anything stating how to or if it’s even possible to only make it show on the client. Any solutions?

Setting an owner and then calling EnableDebug should work. Is there something not working with this behavior?

When i do this it is visible to everybody server wide. I might be doing it wrong?
What i’m doing is when you equip the weapon for the first time it sets the owner and it separate to starting the cast. Anything wrong with doing it like this?

Could you provide a simple .rbxl place which reproduces this issue with minimal lines of code? That doesn’t sound right, I’ll look into it.

Oops! Sorry, I figured it out. I was doing something wrong.
It was an older version of clientcast that had the problem

1 Like

Hey I’m not sure if you’ve answered this before but when I try to do ClientCaster:Start() in a if statement then ClientCaster:Stop() in another if statement it doesn’t recognize the clientcast as being stopped and continues to do damage and the same thing happens for destroy(). Do you know why this is happening and how I could fix this?

You should put a cut down version of the script to make it easier to see what might be going wrong here.

Any plans to remove getfenv() from the signal module due to how it removes optimisations for the entire environment? :neutral_face:

image

image

Feel free to file a pull request on this issue :stuck_out_tongue:
I don’t plan on maintaining ClientCast much anymore besides any critical fixes. It just seems to be a case of ClientCast using an outdated version of GoodSignal.

just started working on one :smile_cat:

and this seems about right

1 Like

Been using this in a new game and it works amazing!

We want to be able to enable the hitbox debugging clientside only (so that no one can see the debug rays) but using a serverside hitbox. I’m aware this sounds silly, but it’s mainly just because some players want to be able to see the hitbox itself. At present we have a debugging tool for admins that enables it serverside, but because that shows it to everyone it’s not useful for when we want to make it per-player. Is there any method that I’ve missed that could allow this, or would it be up to a custom implementation/modification?

This should be possible. You have to set up the cast correctly for it to show client sided though.
If you aren’t yet then the way to do this is with

ClientCaster:StartDebug()
--and
ClientCaster:DisableDebug()

Also if the cast is set up like this:

local ClientCaster = ClientCast.new(Handle, RaycastParams.new(), Player)
--Make sure the player is at the end

And this is called before the caster starts:

ClientCaster:SetOwner(Player)

then it should work.

How I have it set up is where it will check a setting value every time the caster starts to determine whether it should enable or not. That part is pretty basic though.

Any issues with this?

We wanted serverside fully, not client-controlled.

I think to do that you would have to create a caster that does the actual function and then a second dummy one that is just for the debug and isn’t linked to anything else.

Edit:
I tried setting it up this way and it works perfectly from what I see.
The server handles the hitbox but the debug caster is handled by the client so the debug is client sided.

--Debug mode caster
local ClientCasterDebug = ClientCast.new(script.Parent.Handle, RaycastParams.new(), Player)
ClientCasterDebug:SetOwner(Player)

--Actual hitbox
local ClientCaster = ClientCast.new(script.Parent.Handle, RaycastParams.new())

Oh, I’ve got you now. That makes sense.

1 Like

Hey, Ive been using this module for some time now and it works great. But im having problems with the humanoid collision detection? I have an enemy thats larger than a regular roblox character, and somtimes the rays wont detect the humanoid collision?

I have a video demonstrating this issue.

2 Likes

I think it is an issue with your setup. If your enemy is an meshpart, then consider using a box/hull as CollisionFidelity instead, so that the rays have a higher chance of hitting the enemy.

Send the OP a reproduction file in PMs so that they can diagnose the issue, by the way.

1 Like