Hello, I am trying to make tool grip work properly but for whatever reason, it is acting weird.
Whenever I change/take out my sword it changes tool grip. Generally, it looks like the 2nd screenshot first, then the 3rd one, then the first one for the rest of the attempts of equipping it until I change my sword.
local char = script.Parent
local player = game.Players[char.Name]
local SwordSkin = player.Inventory.EquipSword
local CheckSword = player.Backpack
SwordSkin.Changed:connect(function()
if CheckSword:FindFirstChild("Sword") then
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)
player.Backpack.Sword.GripForward = Vector3.new(0, 1, 0)
player.Backpack.Sword.GripPos = Vector3.new(0.01, 0, 1.5)
player.Backpack.Sword.GripRight = Vector3.new(0, 1, 0)
player.Backpack.Sword.GripUp = Vector3.new(0 , 0, -1)
end
end
if char:FindFirstChild("Sword") then
if player.Inventory.EquipSword.Value == "RedSword" then
char.Sword.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=409664704"
char.Sword.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=409665021"
char.Sword.Handle.Mesh.Scale = Vector3.new(2.5, 2.5, 2.5)
char.Sword.GripForward = Vector3.new(0, 1, 0)
char.Sword.GripPos = Vector3.new(0.01, 0, 1.5)
char.Sword.GripRight = Vector3.new(0, 1, 0)
char.Sword.GripUp = Vector3.new(0 , 0, -1)
end
end
end)
The script is in StarterCharacterScripts. Please note that my actual script has a lot more swords but they are all practically the same thing. I only reduced it down to one sword because I wanted to make it easier to read.