Hey, so I created an entity, everything seemed to be working perfectly until I found a bug which I do not know how to fix, basically when the entity is interacted with a vgui menu is supposed to popup for the player who used it, however when any player interacts with it they do not get a vgui menu popup, instead the vgui menu shows up on my screen, I’ve been trying the figure out why this happens but made literally no progress towards solving it.
init.lua (Networking section)
util.AddNetworkString("fieldAgentDisguise") util.AddNetworkString("ertDisguise") util.AddNetworkString("troDisguise") util.AddNetworkString("mtfDisguise") util.AddNetworkString("interacted") function ENT:Use(a,c) for k, v in pairs (whiteList) do if a:Team() == v then net.Start("interacted") net.Send(Entity(1))
include("shared.lua") function ENT:Draw() self:DrawModel() end net.Receive("interacted", function(len, ply) print("Client Running!") local disguiseUI = vgui.Create("DFrame") disguiseUI:SetSize(310,200) disguiseUI:SetVisible(true) disguiseUI:Center() disguiseUI:MakePopup() disguiseUI:SetTitle("Disguise Kit") disguiseUI.Paint = function(s, w, h) draw.RoundedBox(5,0,0,w,h,Color(0,0,0)) draw.RoundedBox(5,4,4,w-8,h-8,Color(255,255,255)) end