This is the local script:
local P = Events.GeneralFunction:InvokeServer("ButtonP", Cloak)
Which travels to the EventHandler script in ServerScriptService
Events.GeneralFunction.OnServerInvoke = function(Plr, Request, Data)
if Request == "ButtonP" then
local Power = powerData[plrData["Buttons"][Data]]
return Power
end
end
"powerData" is a module script which holds the super power data such as cooldown, but I would like to also store the function that the power does:
local module = {
["Cloak"] = {
["CoolDown"] = 5;
["Activated"] = function(Plr)
print(Plr)
end
}
}
However, if i were to below in a local script:
P["Activated"](Plr)
it doesn't seem to work or print the player as set by the function, is what I'm doing actually possible?

2 comments
more information please, what is P?
P is stands for power, I just abbreviated it so exploiters will have a slightly harder time looking through the scripts