if not self["Model"]:IsADescendantOf(Client:WaitForChild("Backpack")) then
return error(tonumber(-1))
else
self["Model"].Activated:Connect(function() Events.SwordEvent:FireServer() end)
end
function SM_Client.Configure(Pack, Damage, Model)
local Loaded, Errored = pcall(function()
local self = setmetatable({}, SM_Client)
self["Pack"] = Pack
self["Damage"] = Damage
self["Model"] = Model
end) if not Loaded then return error(tonumber(-1)) else return print("Test: Success") end
Try defining self.Model
inside the table in setmetatable
. If that doesn’t work, make sure you’re passing a model.