Should i use local script or normal script or use both for tools
can someone please explain what to do
What will these scripts be doing?
moves,emotes and other stuff
Let’s say you’re making a sword…
The tool of course has a handle so the player holds it.
You insert a client script in which you use UserInputService to listen to a player’s left mouseclick.
Once that happens you play the sword slashing animation + sound effect and if the sword hits anything during that animation you fire a remote event inside that tool.
In that same tool there should also be a server script which listens to said remote event.
When remote even gets fired, check if object being hit is a player (or npc) and has a humanoid after which you can substract some health from it.
Use a server script. Local scripts are for the local player only i believe. Since you mention animations and stuff you would want to use a server script.
Animations are auto-replicated if the humanoid has a animator inside of it.
Sound effects replicate if SoundService.RespectFilteringEnabled is turned off.