Enabling UI from Local Script not working

The output came back as “MENU”

Try swapping the localplayer with your argument plr (as you put in the remote.)

refreshed code:

game:GetService("ReplicatedStorage"):WaitForChild("NotAllowedTeam").OnClientEvent:Connect(function(plr)
	print("Received")
	plr:WaitForChild("PlayerGui").MENU.Enabled = true
end)

Afterwards, on the script that fires this remote, I see you have the player argument set.

No luck… it might help if you’re able to see all the scripts in action, so I’ll post them all.

UI Controller Script:

local player = game.Players.LocalPlayer
local ScreenGui = script.Parent
local TeamCard = ScreenGui:WaitForChild("TeamCard")
local ButtonsFolder = ScreenGui:WaitForChild("Buttons") 
local buttonselectedtab = ButtonsFolder.selectedTab
local TeamService = game:GetService("Teams")
local Background = player.PlayerGui:WaitForChild("Background")
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(0.5)
local teamselect = game.ReplicatedStorage.TeamSelect
local menuMusic = script.Parent.MenuMusic

-- Handles class selecting
local CurrentClassSelected
local CurrentUiSelected
for _,Team in pairs(TeamCard.TeamSelector:GetChildren()) do
	if Team:IsA("ImageButton") and Team:FindFirstChildWhichIsA("TextLabel") and TeamService:FindFirstChild(Team:FindFirstChildWhichIsA("TextLabel").Text) then
		local TeamText =  Team:FindFirstChildWhichIsA("TextLabel")
		TeamText.Parent.Name = TeamText.Name
		Team.MouseEnter:Connect(function()
			TeamText.TextSize += 3
			if CurrentUiSelected ~= TeamText.Text then
				Team.ImageTransparency = 0.2
			end	
		end)

		Team.MouseLeave:Connect(function()
			TeamText.TextSize -= 3
			if CurrentUiSelected ~= TeamText.Text then
				Team.ImageTransparency = 0.4
			end	

		end)

		Team.MouseButton1Click:Connect(function()
			if CurrentUiSelected  then
				TeamCard.TeamSelector:FindFirstChild(CurrentUiSelected).ImageTransparency = 0.4
			end
			CurrentUiSelected = TeamText.Text
			Team.ImageTransparency = 0
		end)

	end
end

for _,Card in pairs(TeamCard:WaitForChild("Card"):GetChildren()) do
	if Card:IsA("TextButton") or Card:IsA("ImageButton") then
		Card.MouseEnter:Connect(function()
			Card.TextSize += 3

			Card.TextTransparency = 0.2

		end)

		Card.MouseLeave:Connect(function()
			Card.TextSize -= 3
			Card.TextTransparency = 0.4

		end)

		Card.MouseButton1Click:Connect(function()
			if Card.Name == "EQUIP" then
				if CurrentUiSelected  then
					
					CurrentClassSelected = CurrentUiSelected
					TeamCard.Card.CLASSNAME.Text = CurrentClassSelected

				end
			end

		end)

	end


end
-- Handles Buttons
for _,button in pairs(ButtonsFolder:GetChildren()) do 
	if button:IsA("TextButton") then
		button.MouseEnter:Connect(function()
			button.TextTransparency = 0
			button.TextSize += 3 
			buttonselectedtab.Parent = button
		end)

		button.MouseLeave:Connect(function()
			button.TextTransparency = 0.4
			button.TextSize -= 3 
		end)

		button.MouseButton1Click:Connect(function()
			if button.Name == "PLAY" then
				
				if TeamCard.TeamSelector.Visible == false then
					for i,v in pairs(ScreenGui.SETTINGS:GetChildren()) do
						v.Visible = false
					end
					for i,v in pairs(ScreenGui.STORE:GetChildren()) do
						v.Visible = false
					end
					TeamCard.TeamSelector.Visible = true
					TeamCard.Card.Visible = true
				else
					if not CurrentClassSelected then print("NO CLASS SELECTED") return end
					teamselect:FireServer(CurrentClassSelected)
					menuMusic:Stop()
					task.wait(0.1)
					Background.Enabled = false
					ScreenGui.Enabled = false
				end
			elseif ScreenGui:FindFirstChild(button.Name) then
				for i,v in pairs(ScreenGui.SETTINGS:GetChildren()) do
					v.Visible = false
				end
				for i,v in pairs(ScreenGui.STORE:GetChildren()) do
					v.Visible = false
				end
					TeamCard.TeamSelector.Visible = false
					TeamCard.Card.Visible = false
					
				if ScreenGui[button.Name]["TAB:"..ScreenGui[button.Name].Name] then
					local gui = ScreenGui[button.Name]["TAB:"..ScreenGui[button.Name].Name]
					gui.Visible = true
					print(gui.Parent)
					if gui.Parent.Name == "SETTINGS" then
						local CurrentSettingsMenu 
						print("Parent is settings")
						for i,v in pairs(gui:GetChildren()) do
							if v:IsA("TextButton") then 
								v.MouseEnter:Connect(function()
									if  CurrentSettingsMenu ~= v  then
										v.BackgroundTransparency = 0.9
									end
								

								end)

								v.MouseLeave:Connect(function()
									if  CurrentSettingsMenu ~= v  then
										v.BackgroundTransparency = 1
									end
								end)

								v.MouseButton1Click:Connect(function()
									if CurrentSettingsMenu and CurrentSettingsMenu ~= v  then
										CurrentSettingsMenu.BackgroundTransparency = 1
										gui.Parent:FindFirstChild(CurrentSettingsMenu.Name).Visible = false
									end
									if gui.Parent:FindFirstChild(v.Name) then
										gui.Parent:FindFirstChild(v.Name).Visible = true
										CurrentSettingsMenu = v
										v.BackgroundTransparency = 0.6
									end
									
								end)
							end
							
						end
				
					elseif gui.Parent.Name == "STORE" then -- Store
						local CurrentSelectedUi
						for _,v in pairs(gui:GetChildren()) do
							if v:IsA("ImageButton") or v:IsA("TextButton") then 
								v.MouseEnter:Connect(function()
									if  CurrentSelectedUi ~= v  then
										v.ImageTransparency = 0.2
									end


								end)

								v.MouseLeave:Connect(function()
									if  CurrentSelectedUi ~= v  then
										v.ImageTransparency = 0.4
									end
								end)

								v.MouseButton1Click:Connect(function()
									if CurrentSelectedUi and CurrentSelectedUi ~= v  then
										CurrentSelectedUi.ImageTransparency = 0.4
									end
									CurrentSelectedUi = v
									v.ImageTransparency = 0

								end)
							end
								
							end

						end
						
				end
				
			end

		end)
	end

end

game.Players.PlayerAdded:Connect(function(plr)
	menuMusic:Play()
end)

game:GetService("ReplicatedStorage"):WaitForChild("NotAllowedTeam").OnClientEvent:Connect(function(plr)
	print("Received")
	plr:WaitForChild("PlayerGui").MENU.Enabled = true
end)

Server Script

local players = game.Players
local mainGroup = 14547833




function resetGui(plr)
	game:GetService("ReplicatedStorage"):WaitForChild("NotAllowedTeam"):FireClient(plr)
	print("Event fired, player not allowed on team.")
end

game.ReplicatedStorage.TeamSelect.OnServerEvent:Connect(function(plr, team)
	
	if  game:GetService("Teams"):FindFirstChild(team) then -- Handles Team Change from main GUI
		plr.Team = game:GetService("Teams"):FindFirstChild(team)
		plr.Neutral = false
		plr:LoadCharacter()
		
		-- Checks for group rank dependant on team.
		
		if plr.Team == game:GetService("Teams")["Administrative Department"] and plr:GetRankInGroup(mainGroup) < 16 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Engineering & Technical"] and plr:GetRankInGroup(14551179) > 1 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Foundation Personnel"] and plr:GetRankInGroup(mainGroup) < 10 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Medical Department"] and plr:GetRankInGroup(14551193) < 1 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Mobile Task Force"] and plr:GetRankInGroup(14551183) < 1 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Research Department"] and plr:GetRankInGroup(14552211) < 1 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Security Department"] and plr:GetRankInGroup(14551187) < 1 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		if plr.Team == game:GetService("Teams")["Site Director"] and plr:GetRankInGroup(mainGroup) < 30 then plr.Team = game:GetService('Teams')["Class - D"]
			plr:LoadCharacter()
			resetGui(plr)
		end
		
		
		
	end
	
end)

I’m sure there’s something wrong here that’s causing it to not work but I have no clue.