Stun Module v0.1

[Module Stun v0.1]

Introduction

Welcome to the Module Stun developer guide! This module helps you manage stun effects in your Roblox game with features like temporary humanoid property modifications, customizable behaviors, and debugging tools. Perfect for combat systems or ability cooldowns, Module Stun is lightweight and easy to integrate.

Get the Module: Stun v0.1 ( click here )


Key Features

  • Dynamic Stun Effects: Temporarily modifies properties like WalkSpeed and JumpPower.
  • Customizable Callbacks: Run custom code when stun starts or ends.
  • Stacking Control: Choose whether stun durations stack or override.
  • Debugging Tools: Built-in debugging for easier development.
  • Flexible Targeting: Supports advanced object-finding mechanisms.

Getting Started

Installation

  1. Place the module script in your Roblox project.
  2. Require the module in your script:
    local Stun = require(path.to.ModuleStun)
    
    local humanoid = player.Character:FindFirstChild("Humanoid")
    if humanoid then
       humanoid:GetAttributeChangedSignal("Stun"):Connect(function()
          print( "Stunned !!!!" )
       end)
       
       Stun._Stun(humanoid, 5) -- Apply a stun effect for 5 seconds
    end
    
    

Configuration

The module comes with a Config table to customize its behavior.

Property Description Default
StunLabel The attribute name used for stun tracking. "Stun"
Pattern Prefix for debug messages. "[ Stun Handle ]"
CanStack Allow durations to stack. true
EnableEdit Enable custom callback functions. true
Effects Properties affected during stun. { Walkspeed = true, JumpPower = true }
Ignore List of instance names to ignore for stuns. { "Immortal" }
Debug Enable debug messages. true

FAQ & Troubleshooting

  • Why isn’t the stun working?
    • Ensure the Humanoid is valid and not in the Ignore list.
  • Can I modify other properties?
    • Yes! Add new entries to the Config.Effects table.
  • How do I enable debugging?
    • Set Config.Debug = true to see detailed logs.

Feedback & Contributions

Feel free to share feedback, report bugs, or suggest improvements. Let’s collaborate to make Module Stun even better! :blush: