So i’m trying to use the same remote function for multiple Tasks but it just seem not working
also there’s NO ERRORS on the output
here’s the script :
--- / Onclient / ----
----- First taks ------
local result = GeneralDataCheck:InvokeServer("CheckingPotionsData",thepotion)
----- Second task -----
local result = GeneralDataCheck:InvokeServer("CheckingIfPlayerHaveCastle" )
-----/ On Server / ---
----- First Task ------
GeneralDataCheck.OnServerInvoke = function(plr,taske,thepotion)
print("invoked") --<<<-- DOESN'T PRINT
if taske == "CheckingPotionsData" then
-- whatever
end
end
----- Second Task ------
GeneralDataCheck.OnServerInvoke = function(plr,taske)
print("invoked") ---<<- ONLY THIS PRINT "INVOKED"
if taske == "CheckingIfPlayerHaveCastle" then
-- whatever
end
end