Hello there. I was making a button that opens another UI when a player clicks it. Then, I would have to reset my character because my code was...
game.StarterGui.ScreenGui..Enabled = true
How would I make the script print the players name?
Full Script
--Varibles
local gui = game.StarterGui
local plr = game.Players.LocalPlayer
--Function
function open(plr)
gui.NotifyGui.Enabled = true
wait(.5)
end
script.Parent.MouseButton1Click:connect(open)

4 comments
I have a error on "end)"
Ah sorry! I forgot to delete the end inside the code! The re-Edit should fix that now!
I'm getting "19:28:01.524 - Players.Player1.PlayerGui.ScreenGui.Button1.TextButton.LocalScript:7: attempt to index local 'hit' (a nil value)"
If that's the case try doing print(plr.Name)