✓ Accepted answer
I don't have much experience with Teams, but what I believe is happening is you're attempting to compare a string with an object. To fix this, try comparing the Value to Team.Name instead of Team.
When printing an object in roblox, the output lists its name, but the reference to the object is not actually the name. For instance, consider a part in the workspace named Part as well as a string variable Part:
local part = workspace.Part
local partString = "Part"
print(part, part.Name, partString)
print(part == partString)
print (part.Name == partString)
The first print statement would print (Part, Part, Part). However, the second statement would print out false, as it's not comparing the two directly. The third should work.
2 comments
I think mouse.Target is a string and a string dosent have a b\parent
mouse.Target is the part the mouse is on.