Why is the target in my module script somehow different than the target in my script

I’m making a hitbox system that requires a module which creates a hitbox and then fires to the server to do damage and everything seems to be working fine however whenever the module script gets the hit player (dummy in this case) and sends it to fire onto the server, the hit player switches from the dummy onto the player that fired the attack even though the variables are the same

Video of problem


Module script code

Server Script code
image

The first argument in OnServerEvent is always going to be the player object, so just replace

target, player, Character 

with

plr, target, player, Character

(Also can you please press Shift + Alt + F in the script before posting screenshots of it. The inconsistant formatting makes it harder to tell what is happening)

2 Likes

Sorry for the late reply and bad formatting but thank you again!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.