#scripting weapons and movesets
1 messages · Page 1 of 1 (latest)
Learn roblox oop
And make a base class for the weapons and for the skills
Then make a class that inherits from those base classes that will override the methods of that class depending on the weapon or skill ur making
like self = setmetatable({}, Gun)
Kinda like
Local base_gun = {}
base_gun.__index = base_gun
function base_gun.new(ammo, maxammo, recoil)
local self = setmetatable({}, base_gun)
self.ammo = ammo
self.maxammo = maxammo
self.recoil = recoil
return self
end
--@override
function base_gun:shoot()
--no code here since this function needs to be overrided
end
return base_gun