So, I thought I made a bunch of progress with the plugin you suggested. Everything seemed to be going smoothly. I made a module script containing tables of all the different grip positions that the sword script could access and position the grip positions according to the selected mesh.
Module script:
local Holder = {};
Holder.ClassicSword = {{0,0,-1.5},{-1,0,0},{0,1,0},{0,0,1},{0,0,1},{0,-1,0},{-1,0,0}};
Holder.ClassicLaser = {{0,-1.7,0},{0,0,-1},{1,0,0},{0,1,0},{0,1,0},{1,0,0},{0,0,1}};
Holder.ClassicEnergy = {{0,-1.7,0},{0,0,-1},{1,0,0},{0,1,0},{0,1,0},{1,0,0},{0,0,1}};
Holder.ClassicShattered = {{0,1.7,0},{0,0,-1},{-1,0,0},{0,-1,0},{0,-1,0},{-1,0,0},{0,0,1}};
Holder.ClassicCorrupted = {{-1.7,2,0},{-0.707,-0.707,0},{0,0,1},{0.707,-0.707,0},{0.707,-0.707,0},{0,0,1},{0.707,0.707,0}};
Holder.ClassicLight = {{0,0,-2.6},{1,0,0},{0,-1,0},{0,0,1},{0,0,1},{0,-1,0},{-1,0,0}};
return Holder;
Section of the sword script that modifies the grip positions:
function swordUp()
Tool.GripForward = Vector3.new(holder["Classic"..choice][2][1],holder["Classic"..choice][2][2],holder["Classic"..choice][2][3]);
Tool.GripRight = Vector3.new(holder["Classic"..choice][3][1],holder["Classic"..choice][3][2],holder["Classic"..choice][3][3]);
Tool.GripUp = Vector3.new(holder["Classic"..choice][4][1],holder["Classic"..choice][4][2],holder["Classic"..choice][4][3]);
end;
function swordOut()
Tool.GripForward = Vector3.new(holder["Classic"..choice][5][1],holder["Classic"..choice][5][2],holder["Classic"..choice][5][3]);
Tool.GripRight = Vector3.new(holder["Classic"..choice][6][1],holder["Classic"..choice][6][2],holder["Classic"..choice][6][3]);
Tool.GripUp = Vector3.new(holder["Classic"..choice][7][1],holder["Classic"..choice][7][2],holder["Classic"..choice][7][3]);
end;
and
function onEquipped()
UnsheathSound:play();
Tool.GripPos = Vector3.new(holder["Classic"..choice][1][1],holder["Classic"..choice][1][2],holder["Classic"..choice][1][3]);
Tool.GripForward = Vector3.new(holder["Classic"..choice][2][1],holder["Classic"..choice][2][2],holder["Classic"..choice][2][3]);
Tool.GripRight = Vector3.new(holder["Classic"..choice][3][1],holder["Classic"..choice][3][2],holder["Classic"..choice][3][3]);
Tool.GripUp = Vector3.new(holder["Classic"..choice][4][1],holder["Classic"..choice][4][2],holder["Classic"..choice][4][3]);
end;
Well this code sets the grip positions correctly when FIRST equipped, but as soon as it runs the lunge function, the grip positions don’t set correctly anymore and the sword lays sideways with the incorrect values in the properties. I even tried using the command bar to manually reset the grip positions and it doesn’t do a thing. It’s like the grip positions are locked for some reason. And unequipping the tool and re-equipping it doesn’t fix it. I have attached screenshots of the correct position and grip position vectors of the tool when first equipped and then the incorrect position and incorrect grip position vectors after the lunge function has run.