Hello, I'm having an issue of Mouse.Target only returning "Baseplate", despite me hovering the mouse over other parts. Removing the baseplate stops the code from working altogether, even when hovered over other parts. Help would be appreciated!
The script is a LocalScript inside StarterGui.
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local target = mouse.Target local textlabel = plr.PlayerGui.ScreenGui.TextLabel mouse.Move:Connect(function() textlabel.Position = UDim2.new(0, ((mouse.X+15)), 0, ((mouse.Y+5))) if target then print (target.Name) end end)
Edit, I've attached a gif of the situation here; imgur link. What's weird is that it should be nil when pointing at the sky.
Inside your mouse.Move:connect(function(), add a 'target = mouse.Target' so when you move your mouse, it updates the selected object.