plr = game.Players.LocalPlayer
mou = plr:GetMouse()
acceptable_objects = {"TinyGun", "Crates"}
mou.Move:connect(function()
print('moved')
obj = mou.Target
if obj.Name == acceptable_objects then
print('We have a target!')
print(obj)
plr.PlayerGui.desc.descs.Visible = true
plr.PlayerGui.desc.descs.Text = obj.Name
plr.PlayerGui.desc.descs.Position = UDim2.new(0,mou.X,0,mou.Y)
end
if obj.Name ~= acceptable_objects then
plr.PlayerGui.desc.descs.Visible = false
end
end)
There is no error, it runs right, except it will not work at line 7, it basically just stops there. The script runs each time the mouse is moved, but it will not run the conditional statement. I know this because I already removed line seven, and then it worked. It actually worked perfectly.

1 comment
The main Errors I see within the code are lines 7 and 15; You are attempting to compare 'obj.Name' (A String Value) to 'acceptable_objects' (A Table Value).