Hello, I have quite the… unique way of switching sword skins. The default sword is oriented correctly but when the mesh is changed it breaks the orientation.
if player.Inventory.EquipSword.Value == "RedSword" then
player.Backpack.Sword.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=409664704"
player.Backpack.Sword.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=409665021"
player.Backpack.Sword.Handle.Mesh.Scale = Vector3.new(2.5, 2.5, 2.5)
end
if player.Inventory.EquipSword.Value == "BlueSword" then
player.Backpack.Sword.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=365565135"
player.Backpack.Sword.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=365565061"
player.Backpack.Sword.Handle.Mesh.Scale = Vector3.new(2, 2, 2)
end
if player.Inventory.EquipSword.Value == "DarkSword" then
player.Backpack.Sword.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=94840342"
player.Backpack.Sword.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=250727362"
player.Backpack.Sword.Handle.Mesh.Scale = Vector3.new(.75, .75, .75)
end
if player.Inventory.EquipSword.Value == "OmegaSword" then
player.Backpack.Sword.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=283709615"
player.Backpack.Sword.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=283709681"
player.Backpack.Sword.Handle.Mesh.Scale = Vector3.new(.5, .5, .5)
end
This seems to work correctly for the mesh, texture, and size but the orientation is off.
This is the default sword and the orientation is correct.
This is a different sword and the orientation is wrong. Note that the only things that changed are the mesh, texture, and size.
If I need to provide any additional information then please let me know!
You can always try to mess with the ToolGrip numbers until you find the perfect orientation before putting them in your script. Eh, that’s all I can think of without the plugin.
Hi! Tool grips are hard to understand if you don’t know a lot about CFraming so to bypass all of this, i just make a .5x.5x.5 part and weld it to the swords handle, THEN name the part handle and the player will hold the part handle and it will look exactly like if you got the tool grip perfect! Hope i helped :3
use tool.Grip = someCFrame to set it tool.Grip is a local offset from where the hand holds tools
the little grip properties are just the directional vectors from tool.Grip (up, look, and right)
For something like this, my personal recommendation is to create an artificial handle using accessories. Instead of putting the handle in the tool, you would put it in an accessory which would be attached when the tool is equipped or destroyed when it is unequipped. You can then work from here better.
You have two options for how you can change this artificial handle: you can change the mesh and attachment properties so you’re only using one accessory (good on memory), or you can create all the tool handles in a folder and preset everything necessary via Studio (good on ease of access and comfortability).
I wrote a post on attaching assets to players’ hands some time ago, which you can use as a reference. I intend to expand it at some point into a much more detailed resource. It is here: