This error keeps appearing while it shouldn't Code:
button.MouseButton1Click:Connect(function(plr)
print(plr.Name)
if
script.Parent.Text == "..."
then
result.Enabled = true
Error: 18:59:42.616 - Players.probeast0101.PlayerGui.ScreenGui.Frame.Player1.Script:8: attempt to index nil with 'Name'

4 comments
you need to define plr, you can add this line of code into your script instead using plr parameter
local plr = game.Players.LocalPlayerThis is not your entire code, we can only see 7 lines here
could you put the entire code? it would be nice to know more so i can attempt to help.
MouseButton1Click event does not return the player as argument, so
plris nil like the person said in the comments define plrlocal plr = game.Players.LocalPlayer