#scripting weapons and movesets

1 messages · Page 1 of 1 (latest)

lilac root
#

any pointers or guides on where to learn how to make weapons with built in skills and stuff? help would be appreciated 😅

versed stratus
#

tools

#

with localscrcipts

#

that fire events to server scripts

#

@lilac root

zenith pier
#

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

full charm
#

like self = setmetatable({}, Gun)

zenith pier
# full charm 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