I dont really know how to explain this but im trying to make a kill effect for weapons and i need to require a module using a string but also give some arguments but this is not working
Server Script
if ClientModule.KillEffect ~= nil then
require(Modules.KillEffects)[ClientModule.KillEffect](Ragdoll)
end
KillEffects module
local module = {}
function module.Golfify(Ragdoll)
for _,v in pairs(Ragdoll:GetDescendants()) do
if v:IsA("BasePart") then
local Weld = Instance.new("Weld", v)
Weld.Part0 = Ragdoll.HumanoidRootPart
Weld.Part1 = v
v.Material = Enum.Material.Metal
v.Color = Color3.new(1, 1, 0)
end
end
end
return module
ClientModule
KillEffect = "Goldify"
sorry for bad english or dumb explanation