Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Should this be in a local script or normal script, neither work?

Asked by
wookey12 174
6 years ago

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.

0
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. iamnoamesa 674 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

You should put it as a normal script. By putting the script in the sword along with the animations.

0
how would it access local player though? wookey12 174 — 6y
0
it didn't work wookey12 174 — 6y
0
Where is the examp? IIApexGamerII 76 — 6y
0
Mistake, make the script as a "LocalScript" then put it in the sword with the animations in the "Handle". IIApexGamerII 76 — 6y
0
But make sure you keep the normal in the sword that functions it to slice and lunge IIApexGamerII 76 — 6y
Ad
Log in to vote
0
Answered by
Gwenz3 0
6 years ago
Edited 6 years ago

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

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. wookey12 174 — 6y

Answer this question