if you don’t want to edit your module every single time just make everything predefined in your module, but there is some details
idk how player data is made in your game, but, this small example:
(uses [Values] stored inside the player.Localplayer )
local PlayerStats = {
["Blocking"] = false,
["Parrying"] = false
}
local Blocking = Instance.new("BoolValue", player)
Block.Name = "Blocking"
local Parrying = Instance.new("BoolValue", player)
Parrying.Name = "Parrying"
--some devs may say storing values is bad since blah blah blah,
--but who really cares, when it comes to gameplay
--nothing matters but the moment itself, this is for learning purposes,
--(and yes, you could just create variable references and
--stuff inside a table to reference everything without using any values)
using GetPropertyChangedSignal ( server-side and local client scripts)
it will check when Blocking and parrying is TRUE or False
example:
local plr = game.Players.LocalPlayer
plr.Level:GetPropertyChangedSignal("Value"):Connect(function()
--stuff here if the value somehow changed
end)
this can help in multiple ways, and with this you can edit your module
–Inside your module you can some stuff like:
local Module = {
["Blocking"] = {
--References here, only if the player is blocking
},
["Parrying"] = {
--References here, only if the player is Parrying
},
}
return Module
if you noticed, you never will edit anymore values in scripts( that are coming from your modules)
and you will
run anything directly, according to player status, block or parry
you can use this to check player actual damage
check her/his weapon
check weapon knockback
range
and even more,
you don’t need to edit your module, just create predefined values for each player when they join, inside a table or whatever
and then each time that value change, it will change dramatically everything,
since any action will be different (from modules)
as i said above