I made a frame that follows the player's mouse, and then tryed adding a line that changes the Text of the TextLabel found in the frame. It gives this error in Output : "11:49:32.735 - Players.Player.PlayerGui.Info.Info.TestScript:6: attempt to index local 'target' (a nil value) 11:49:32.736 - Stack Begin 11:49:32.737 - Script 'Players.Player.PlayerGui.Info.Info.TestScript', Line 6 11:49:32.738 - Stack End"
And it has the code :
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local target = mouse.Target
while true do
script.Parent.TextLabel.Text = "Name: " .. target.Name
wait(0.1)
end

1 comment
Thank you for helping!