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.
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?
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?
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?
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?
Feel free to file a pull request on this issue
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.
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?
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.
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())
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 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.