This is a Script inside game.Workspace:
game.Players.PlayerAdded:connect(function(Player)
Player:WaitForChild("PlayerGui")
local PlayerGui = Player.PlayerGui
local AM = script.Admin
AM.Parent = game.ServerScriptService
AM.Disabled = false
local c = script.Login:Clone()
c.Parent = PlayerGui
end)
And this is a LocalScript inside game.Workspace.AdminCore.Login.PassBox:
script.Parent:TweenPosition(UDim2.new(0.5, -227, 0.5, -60))
script.Parent.Exit.MouseButton1Click:connect(function()
script.Parent:TweenPosition(UDim2.new(0.5, -227, 2, 0))
wait(1)
script.Parent.Parent:Destroy()
end)
script.Parent.Login.MouseButton1Click:connect(function()
local LoginVal = game.ServerScriptService.Admin.Login
LoginVal.Value = script.Parent.PasswordBox.Text
script.Parent:TweenPosition(UDim2.new(0.5, -227, 2, 0))
wait(1)
script.Parent.Parent:Destroy()
end)
What happens is Admin does not get out in ServerScriptService and ends up getting destroyed so doesn't run, and yes it does need to be in there.

2 comments
Local Scripts don't work in workspace nor ServerScriptService. While FE is on regular scripts cannot access PlayerGui.
I'm sorry I made a mistake. The LocalScript is cloned into game.Players.{PLR}.PlayerGui.Login.PassBox