countdown = 11
username = "AntonioVillavicencio"
if game.Players.LocalPlayer.Name == username then
script.Parent.launch.Visible = true
end
script.Parent.launch.MouseButton1Click:connect(function()
while countdown > 0 do
countdown = countdown - 1
script.Parent.COUNT.Text = countdown
wait(1)
end
script.Parent.COUNT.Text = "WE HAVE LIFT-OFF"
game.ReplicatedStorage:WaitForChild("workspaceEvents").rockets.launch:FireServer()
end)
why does the following segment not work :
username = "AntonioVillavicencio"
if game.Players.LocalPlayer.Name == username then
script.Parent.launch.Visible = true
end
Ingame, the button does not appear. The rest of the script works smoothly.

2 comments
Have you checked on the in-game developer console? Hit 'F9' or chat '/Console' to open it up. Click on 'Server Log' or 'Client Log' and see what it says there. Also, I suggest using UserId instead of name because if you ever change your username on ROBLOX, you don't need to update the script because NOBODY can change their UserId. If it's your account, (Owner of the game) just use, game.CreatorId
The script works in test mode, however, it does not work when ingame.