I have a combat game that uses attributes as a main thing to tell when a player is attacking, stunned, and parrying. The main issue though is that I find myself and friends having conflicts with the stun and other main aspects, like if it a player is supposed to be stunned but then another script disables the stun or when I enable the player’s WalkSpeed but then a script disables it… Also I see the combat being jankier the less fps and higher ping a player has. I’m wondering what’s the right way to deal with these conflicts so attributes aren’t changed when intended. My current method of switching on and off these attributes is by turning them on then using task.wait() then disabling the attribute.
1 Like
Since there is no code, the best thing you can receive is normal coding advice.
In general: You should have 1 main stunPlayer() function, parry() function etc. Try to make sure they don’t overlap with each-other, as in interact with each-other so that it’s easier to figure out what is going wrong in your code when something does get wrong.
Last advice I can give: Keep it simple. Worry about performance or optimizations later. If it doesn’t work, then there’s no point in optimizing.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.