I'm trying to make a little GUI pop up and display the name of the Brick the mouse is pointing to. Here is my script:
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
if Mouse.Target:IsA("BasePart") then
Player.PlayerGui.Selection.Label.Visible = true
Player.PlayerGui.Selection.Label.X = Mouse.X
Player.PlayerGui.Selection.Label.Y = Mouse.Y
Player.PlayerGui.Selection.Label.Text = Mouse.Target.Name
else
Player.PlayerGui.Selection.Label.Visible = false
end
But I keep getting this error:
Players.Player1.PlayerGui.LocalScript:6: attempt to index field 'Target' (a nil value)
Does anyone know why this is happening.

2 comments
ah you got it just before me!
Oh thank you very much