yea it works thanks great module btw
Hi Iâm back and I have another Issue. For some reason when the player dies Client Cast stops working as seen here combat v2 - Roblox Studio 2021-02-01 00-00-09. I have no idea why this happens but while trying to fix the issue I found out that by changing this line of code from the Client Connection Module from CloneHandler().Parent = StarterPlayer:FindFirstChildOfClass(âStarterPlayerScriptsâ) to CloneHandler().Parent = StarterPlayer:FindFirstChildOfClass(âStarterCharacterScriptsâ) as seen here https://gyazo.com/cbc1ac9eff1a924b8712cc7214a30e44 pretty much fixes this problem but causes lag after every respawn. Heres the code of me using the module local function Punch() local PhysicalHitbox = game.ServerStorage:WaitForC - Pastebin.com. If I messed up using it or skipped any steps let me know so I can fix this. Other than this issue the module works perfectly.
I believe this could be an issue with your code, as seen in the gif:
Otherwise, to fix your problem I would need a studio place file with a script that reproduces this issue.
check your messages I sent you the place file. Also just fixed that bug and Iâm still having the same issue.
Iâve located the issue - you are deleting the ClientHandler
localscript from PlayerScripts
, thus not allowing ClientCast to function.
Donât know how that happened but by not using auto set up and setting it up myself it works perfectly. Thanks for pointing me in the right direction.
[Update 1.0.2]
- Removed
Settings
methods - Iâve come to realize it is best not to allow runtime editing of debug settings. - Added
ClientCaster:GetPing()
method - if theClientCaster
object has a setOwner
, it will return the ping of that player by calculating delay between client-server. NOTE This is a yielding function, and it will yield until it getâs the players ping. - Added
ClientCaster:SetMaxPingExhaustion(number Time)
- determines how long theClientCaster:GetPing()
method can yield for before resuming, to protect against potential exploiting. Default exhaustion time is1
. - Added
ClientCaster:GetMaxPingExhaustion()
- returns how long theClientCaster:GetPing()
method can yield before resuming. - Switched from
Maid
to a slightly alteredJanitor
for cleaning-up. - Updated
RBXWait
module version. - Fixed issue with
FilterDescendantsInstances
not serializing.
[Update 1.0.3]
- Removed
DebugObject
in favor of two newCaster
methods:DisableDebug
andStartDebug
. These are real-time alternatives to what was previously offered - Added read-only Disabled property of
ClientCaster
- true by default - Removed Janitor module from the code, as it is redundant.
- Addressed inconsistency with some functions being global
- Rewrote
ClientCaster:Destroy
method for consistency - Ping returned by
ClientCaster:GetPing()
is now divided in two - this is because the code previously took into account for the whole two-way trip between the server and the client, rather than just the client - Rewrote
ReplicationBase
class code for consistency -
ClientCaster
s have theirDebugMode
set toSettings.DebugMode
by default - Removed
ClientCaster
methods on client that werenât used - The server now sends
DebugMode
data ofCaster
to client - Attempted method of addressing issue where the client would send hit-data before the server could tell the client that the
Caster
has been terminated, thus invoking events even after aCaster
has been terminated - Rewrote signal module
- Updated RBXWait module to latest version
- Updated thread with new in-game examples
The wiki has been updated accordingly.
Suggestion:
Add a simulation radius option, for ownership. Similar to how Roblox manages Part ownership.
Hitboxes are meant to be bound to only one player throughout their whole lifetime in almost all cases - I donât know why you would want such a feature.
I was intending to use the hitbox on a rotating killbrick, but didnât wish to set the ownership to the server or a single player. Therefore my suggestion.
You shouldnât let clients calculate those sort of hitboxes - I recommend just setting the owner to nil
(default).
Note
Not an update, but the GitHub repository has been updated with an MIT license due to it being requested.
Works well with my melee weapons.
But I wanna ask if itâs a good idea to use this for range too?
[Update 1.0.4]
- Re-structured the hierarchy - there is now no folder, but rather all scripts are parented under the main
ClientCast
modulescript.
- Added
Settings.DebugAttachmentName
- Added
Caster:SetRecursive(Bool)
- when set totrue
, the Caster object will search for Raycast points (DmgPoint
s) from the whole objectâs descendants, rather then the objectâs direct children. Useful for models and characters. - Due to the above change, ClientCast now accepts types other than
BasePart
s. - Added read-only
Caster.Recursive
property - Fixed
Caster:SetObject
not working as expected - When destroying a caster or switching invoking
Caster:SetObject
, the debug trails are deleted alongside it
If you add and remove DmgPoints the DebugBeams duplicate them selves. Iâm not trying to have 300 Attachments in my character at all times, so can you make it so it only creates the debug beams with the current DmgPoints that are inside of the Object you are raycasting from?
[Update 1.0.4.2]
- You can now parent and destroy DmgPoints without any mishaps (cc. @Splixent)
add something to auto ignore the tool or the model where the DmgPoints are
Is there any type of anti-cheat for this? Players can easily spoof this. For now I think Iâll use ray cast hit box.
You can just use .Magnitude and tick() to check if the hit was valid.