Battleground Modulepack (Ragdoll, Stun, Direction, Cooldown)

I made multiple modules to help you with your battlegrounds game

Modules.rbxm (4.4 KB)

Ragdoll Module (server):

.Start(Rig : Model) -- Returns nil
.Stop(Rig : Model) -- Returns nil
RagdollModule[Rig] -- Check if they are ragdolled (returns a table)

Stun Module (client or server):

.Start(Rig : Model) -- Returns nil
.Stop(Rig : Model) -- Returns nil
StunModule[Rig] -- Check if they are stunned (returns a boolean)

Cooldown Module (client or server):

.new() -- Returns customizable settings
:set(count : number?) -- Returns nil
:update() -- Returns the amount of seconds until the next cooldown (or end of cooldown if there is just one)

The settings documentation found in the source code:

local self = {
	lastTick = tick(), -- Seconds since last Count
	Count = 0, -- Amount of times the cooldown has repeated for
	Settings = {
		Infinite = true,  -- Goes back to 1 if Count is reset
		Repeat = 4,    -- How much times the cooldown repeats before stopping or cooldown
		Cooldowns = {
			resetAfter = 1.5,    -- Resets after nth seconds being inactive
			resetCooldown = 2,   -- The cooldown between the transition from Repeat to 1
			Interval = 0.4       -- Cooldown between each repeat
		}
	}
}

Direction Module (client):

:GetMoveVector() -- I know this already exists but its easier than require(game:GetService("Players").LocalPlayer.PlayerScripts:WaitForChild("PlayerModule").ControlModule):GetMoveVector() (Returns a Vector3)
:IsMoving() -- Ok I know you can just do Humanoid.MoveDirection.Magnitude <= 0 but same reason as last time (Returns a Vector3)
:GetMoveDirections() -- Returns a table with Vector3s
:GetCameraRelativeDirection() -- Returns a Vector3

(I am planning to add a Crater module soon)

8 Likes

Humanoid.MoveDirection in question

Oh yeah my bad I meant to say movedirection

so anyway I tried your ragdoll module after you commented in a different ragdoll thread

it doesn’t really seem to work how it should, not sure if you tested this before posting?

same behavior regardless of r6 or r15

You know it is supposed to be in a server script right?

oh my god really? no way, how come I didn’t think of that :exploding_head:

/sarcasm

it was a server script

1 Like

Well something is wrong on your part, because for me it works perfectly fine.
image

require(game.ReplicatedStorage.Ragdoll).Start(workspace.Rig)

image

Even works with R6

K I released an update that will probably fix @tibiscus’s issue

wdym direction module ?
directional walking / tilt ?
+
could u add a hotbar ?
no showcases? ragdoll etc,

1 Like

Sure also direction module is like, the direction your character is moving and how it is moving relative to the camera, etc.

ty this is so useful
and i think you gonna make vid idk.

1 Like

Hey, I’m trying to use the Ragdoll module in addition to welding a character to a moving part welded to another character but it seems to cause lots of problems like the parts lagging when the player holding them shifts too much and it also seems to weigh down the player even though everything is set to massless. Do you know any solutions to this?

1 Like

Can you send some footage of the problem so I could have a deeper look into this?

Heres the footage, when welding a ragdolled character it causes these weird issues. Like when I was spinning, I wasn’t even touching my keyboard.

use obs :sob:

I can not see the video “This video cannot be rendered because your browser does not support the codec.”

bro I literally did :sob: Does this one work

1 Like

yes

mb bro :stuck_out_tongue:

@ChatGGPT

1 Like

I think I know the problem here
Since the Primary Parts of the NPCs’ Network owner is set to the server (nil) it is controlled by the server and not the player holding the NPCs. Maybe you could try to set the NetworkOwner to the player holding the NPCs and tell me how that works out (I can’t do it right now because I cannot use Roblox Studio currently)

It would be something like

PrimaryPart:SetNetworkOwner(PlayerObject) -- In this case, the player holding them