Hello, I want to ask you this question… I am creating a block in the local script of the weapon in the future to be used as a detector of who touched it. But when the weapon is activated, the detector sees only my body parts. When the enemy approaches the detector, he does not see it and does not touch it. How can I fix this if I don’t want to use the event to transfer to the server?
I’ll notice… I previously created a transfer of data to the server via an event and there in the server script I created a part in the future as a detector. But at ten minutes of playing the game, I noticed that the detector becomes inhibited, and then completely stops noticing who is touching it. And I decided to do everything basic in a local script, and transfer the damage simply through the event.
Hey there, so basically when you do something on a local script, only the client can see the changes made, so nothing really happens on the server. That might explain why the “enemy” can not see the detector, as you are making it on a local script.
But, the local script can still use .Touched
event to know what touched the part made and it should work for everything that touches the part, doesn’t matter if they can see it or nah, so what seems to be the problem?
I also tried to make the Handle touchable, but walking enemies can’t see it either, which is the problem I didn’t find. To be honest, I don’t understand why I created a weapon script in a local script, maybe I’m afraid that from past experiences I remember how the game hangs when I overload it with server scripts and try to minimize it.