So I made a script, that turns green when a player touches another player, but the problem with it is that it will only turn green when a player's not holding a sword. It's supposed to change the meshes color to green whether the player's holding a sword or not. Could somebody fix this?
handle = script.Parent.Handle
handle.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") and not part.Parent:FindFirstChild("LinkedSword")then
handle.Mesh.VertexColor = Vector3.new(0, 1, 0)
else
handle.Mesh.VertexColor = Vector3.new(1, 1, 1)
end
end)
