so, this is getting me really mad, no error BUT I DO NOT UNDERSTAND what’s wrong, xd, basically:
local Players = game:GetService('Players')
local Combat = require(game.ReplicatedStorage.CombatSystem.Swords)
local Methods = {}
Players.PlayerAdded:Connect(function(Player)
local char = Player.Character or Player.CharacterAdded:Wait()
local met = Combat.new(Player,{UpperTorso = 10,HumanoidRootPart=10},game.ReplicatedStorage.CombatSystem.Animations.xdddd,char)
Methods[Player.UserId] = met
wait(10)
Combat:Equip('Basic Sword',8)
end)
Uh, I mean, you’re prob right, but… why would this work?
I mean Swords is a table, I shouldn’t do self.Player as I did before?
Why did it didn’t worked before tho
Why should it?
You could simplify several things in there to make it easier to debug, self didn’t work there because you defined self's value as a table, if you define this function:
as
function Swords:new(player, ...)
then self would reference the Swords table within that block, so you could then just do
I see the problem now. Its really simple. You set the object to a variable named met. You should be calling the method through that variable, aka met:Equip()
i don’t know if this would help but self.Player is just nil and you referenced it in other functions but if you reference it on the entire module it might work