I am making a game where the player holds a sword. i want the sword to move with the animation instead of having the right arm moved up and anchored, so it can move with the animation. my solution was to make the tool, a non-handle tool. i welded the tool to the player's arm every time he equips it. the problem with that is it can't go in a local script, or a script. because you are accessing a body part in a player, which has to be in a local script. and you are also accessing the sword, out of the player's body, which can't be in a local script. i am confused and unsure of what to do. if anyone could help me, it would be heavily appreciated.
COMMUNITY QUESTION
Should this be in a local script or normal script, neither work?
2 answers
You should put it as a normal script. By putting the script in the sword along with the animations.
5 comments
0
how would it access local player though?
0
it didn't work
0
Where is the examp?
0
Mistake, make the script as a "LocalScript" then put it in the sword with the animations in the "Handle".
0
But make sure you keep the normal in the sword that functions it to slice and lunge
Use a local script to put player stuff in then a regular script to put the sword stuff in then link them by using a script to contact other things in the other script
1 comment
0
could you give me an example, i don't know what your talking about. you can't change the weld's part0 value in a local script.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
A local script can be used to detect when the player equips it, then calling a remote event or a function to equip it. It will also handle animations. On the other hand, you'd need a server script inside the item, detecting bricks by using the Touched event and dealing damage if needed to.