Ripple Module [Version 1.5]

Ripple Module Version 1.5

Link

Creates ripples based on a parts cframe and then the ripple parts are sorted from its distance from the part.
Based on the Mega Hunts ripple effect in a section of the Mega Token Lobby.

Preview

RippleModule_Preview (1) Color Ripple
RippleModule_Preview (2) Splash
RippleModule_Preview (3) Giant Splash

Code Examples
Example 1 (Basic)
local Parts = script.Parent.Parts:GetDescendants()

local Debounce = false

local Ripple = require(game:GetService("ReplicatedStorage"):WaitForChild("RippleModule"))

for _, Part in ipairs(Parts) do
	if Part:IsA("BasePart") then
		Part.Touched:Connect(function(otherPart : BasePart)
			
			if Debounce or otherPart == Part then return end
			
			Debounce = true
			
			task.delay(1, function()
				Debounce = false
			end)
			
			local Velocity = otherPart.Velocity.Y -- The Velocity Y axis

			if Velocity < 0 then -- Must be put for it to make a splash styled ripple
				Velocity = -Velocity
			end
			
			Ripple.Create_Ripple(Parts, otherPart, Velocity, {script.Parent.Base.CFrame.Y}, {Color3.fromRGB(17, 17, 17), Color3.fromRGB(97, 147, 255)}, {200})
		end)
	end
end
Example 2 (Dance floor thingy)
local Parts = script.Parent.Parts:GetDescendants()

local Debounce = false

local Ripple = require(game:GetService("ReplicatedStorage"):WaitForChild("RippleModule"))

for _, Part in ipairs(Parts) do
	if Part:IsA("BasePart") then
		Part.Touched:Connect(function(otherPart : BasePart)
			
			if Debounce or otherPart == Part then return end
			
			Debounce = true
			
			task.delay(1, function()
				Debounce = false
			end)
			
			local Velocity = otherPart.Velocity.Y -- The Velocity Y axis
			
			Ripple.Create_Ripple(Parts, otherPart, 0, {script.Parent.Base.CFrame.Y}, {Color3.fromRGB(17, 17, 17), Color3.fromRGB(97, 147, 255)}, {200})
		end)
	end
end
Credits

Should I make more modules like this?

Close the poll at 50 votes or in a 2 weeks (6th April 2025).

  • Yes
  • No

0 voters

Feel free to leave any feedback about anything you think should be change, fixed or reworked.
Make sure any feedback follows the Roblox TOS and the Developer Forum TOS

15 Likes

Hi,
An example .rbxl might be nice on how to set it up…

I tried… , what is wrong…

  12:38:34.092  Stack Begin  -  Studio
  12:38:34.092  Script 'Workspace.Parts.Script', Line 26  -  Studio - Script:26
  12:38:34.092  Stack End  -  Studio

**

**

ripple 2.rbxl (58.8 KB)

thanks

This is super cool actually, I saw your replies to my quick demo on the same topic and this completely blows my mind, great work! :slightly_smiling_face:

1 Like

Thank you for checking it out. A little sneak peak for Version 2 is that the parts will descend and raise to make it look better. :wink:

1 Like

Version 1.5

  • Added a splash effect
  • Replaced most of the variables with Tables
  • Fixed some the color not becoming the default color and the default CFrame spot

Ummm, I do not get what this means…

You do not have a basic Y axis default

Can u provide a working .rbxl that we all can check out…. Thanks

Just out of interest, would you like to see the code to the other ripple?

I would like to check out your code to a ripple, can the material of the ripple be changed to other effects ?

Thanks

Out if general interest sure, but send it in private messages if not ok with it becoming public.

You can’t really do that smoothly because you can’t use material in a tween.

Eh, its really crap anyway, I’ll send it in private messages at some point :slightly_smiling_face: