Hey guys, I am making an addon and in the addon, there is a list of every staff. when ever a staff player joins I want the game to readd the player by using a table containing every steamid of every staff.
I already have the table and stuff figured out and I know it works for a fact. How ever, when ever I try this code the function ‘PA_reapplyStaff()’ just doesnt seem to get called at all?
hook.Add("PlayerConnect", "PA_PlayerConnect", PA_PlayerConnect) local function PA_PlayerConnect(name, ip) PA_Broadcast('PA_colorGood, "' .. name .. '", PA_colorDefault, " connected to the server"') PA_reapplyStaff(name) return "" end
BUT! When ever I run the function ‘PA_reapplyStaff()’ by writing something then saving it, causing the code to be refreshed, it works.
I even tried to make the function inside a timer because I thought the function couldnt be called while the player was still joining. But to no luck, the function still wasnt called.
Am I missing