What's wrong with this script? There was nothing wrong with the output could someone help?
It doesn't turn green when you touch someone with a sword. Well, it does but it doesn't return to normal AND sometimes, it doesn't even turn green when you want it to... I need this upgraded please..
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, 255, 0)
else
handle.Mesh.VertexColor = Vector3.new(255, 255, 255)
end
end)

2 comments
What exactly should the script be doing?
So when you touch a player, with the sword it turns green. And when you take it out it needs to return to normal. But the problem is it just stays green, and rarely even turns green when you stab them. I need it to be imediately.