I know the title is a bit confusing, but I couldn`t think of any good name. Anyways, what I want to ask is, is there any way to refer to properties or function by string? For example, I have a module script that contains this:
local module = {}
function module.blah1(bool)
if bool == true then
print("Blah1")
end
end
function module.blah2(bool)
if bool == true then
print("Blah2")
end
end
return module
And the normal script will require this when Player Fires RemoteEvent.
local blahModule = require(script.ModuleScript)
local function printBlah(plr,actionName)
--This Part Will Be Explained Later.
end)
game.ReplicatedStorage.BlahRemote.OnServerEvent:Connect(printBlah)
Now, If I were to make actionName either "Blah1" or "Blah2", Is there anyway to run the module function something like this?
local function printBlah(plr,actionName)
blahModule.actionName(true)
end)
Sorry for confusing text, and thankyou for any helps :D

2 comments
Thankyou So Much:D My Script worked out
thank YOU i only knew that you could do anonymous functions, not actual functions. hope your projects goes well