Gui only turns on once, second time doesn't work

Script:

game.ReplicatedStorage.InventoryEvent.OnServerEvent:Connect(function(plr)
	
	if plr.Inventory.Value < plr.Inventory.InventoryMax.Value then
		
		plr.Inventory.Value += 1 * plr.Multiplier.Value
		print("added")
		
	else
		
		plr.PlayerGui.SellWarning.Container.Visible = true

		
	end
	
end)

Local script:

script.Parent.MouseButton1Click:Connect(function()
	
	script.Parent.Parent.Visible = false
	game.ReplicatedStorage:WaitForChild("TeleportEvent"):FireServer(game.Workspace:WaitForChild("Sell"):WaitForChild("TeleportPart").Position)
	print(script.Parent.Parent.Visible)
	
end)

What am I doing wrong?

Did you happen to use the wrong code for your local script? Because on the client, you’re firing a remote with TeleportEvent but on the server, you’re receiving the remote with InventoryEvent ?

game.ReplicatedStorage:WaitForChild("TeleportEvent"):FireServer(game.Workspace:WaitForChild("Sell"):WaitForChild("TeleportPart").Position)

Oh crap I forgot to include the 3rd script (what sends to inventory event) and the 4th (which receives teleport event)

3rd (LS)

local tool = script.Parent
local anim = tool:WaitForChild("Hit")

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local load = hum:LoadAnimation(anim)

local mouse = plr:GetMouse()

print("vars")

tool.Activated:Connect(function()
	
	load:Play()
	if mouse.Target.Name == "Anvil" then
		
		game.ReplicatedStorage:WaitForChild("InventoryEvent"):FireServer()
		print("anvil")
		
	end
	
end)

4th (SS)

``
game.ReplicatedStorage.TeleportEvent.OnServerEvent:Connect(function(plr,loc)

plr.Character.HumanoidRootPart.Position = loc

end)

I’m not sure if this is intentional or not.

if plr.Inventory.Value is lower than plr.Inventory.InventoryMax.Value, and plr.Inventory.Value += 1 * plr.Multiplier.Value keeps the condition true, it will always execute the code within that condition instead of executing the else block.

Maybe have the if statement separated from the Visible property modifier? That way, it always shows the UI?

game.ReplicatedStorage.InventoryEvent.OnServerEvent:Connect(function(plr)	
	if plr.Inventory.Value < plr.Inventory.InventoryMax.Value then		
		plr.Inventory.Value += 1 * plr.Multiplier.Value
		print("added")			
	end

	plr.PlayerGui.SellWarning.Container.Visible = true	
end)

If I do that, everytime someone get’s an item it will ask them to sell, I’m trying to make it so when they have max items, they get the gui.