Guys I need help.. I want to make the script ignore the "Names" in the list but for some reason it won't work. Halp.
Here's the script:
local player = game.Players.LocalPlayer local playername = player.Name local mouse = player:GetMouse() local list = {"Part","Grass","Room","Window","FrontWall","Model"} --Names to ignore function hover() for _= v ,#list do if v == #list then game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Visible = true local text = mouse.Target.Parent.Name game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Text.Text = mouse.Target.Name game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Position = UDim2.new(0,mouse.X,0,mouse.Y) else game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Visible = false end end end mouse.Move:connect(hover)
local player = game.Players.LocalPlayer local playername = player.Name local mouse = player:GetMouse() local list = {"Part","Grass","Room","Window","FrontWall","Model"} --Names to ignore function hover() for v=1 ,#list do if list[v] == mouse.Target.Name then game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Visible = true local text = mouse.Target.Parent.Name game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Text.Text = mouse.Target.Name game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Position = UDim2.new(0,mouse.X,0,mouse.Y) else game.Players:WaitForChild(playername).PlayerGui.Ob.Object.Visible = false end end end mouse.Move:connect(hover)