I have a question about OOP. Lets say i want to make a sword class and i have added all the necessary coding to make it work. If i want to make the sword work should i do like this? Is this the correct way of making it. It seems weird to create a newsword everytime the player uses their weapon!
tool.Activated:Connect(function())
local NewSword = Sword.new()
NewSword:Damage()
end)
Bruh thought you were gonna tell him how to fix it : /. Anyways you should be making the class outside the function and calling the take damage function inside the activation
local newSword = Sword.new()
tool.Activated:Connect(function()
newSword:Damage()
end)