Ripple Module Version 1.5
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
Color Ripple
Splash
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
- Real_Alyke : Giving me the idea to make it raise through his community post.
Should I make more modules like this?
Thank you reaching 50 votes before the timer ended!
- 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
Join my Discord Server: Superstar
[This module will no longer recieve update do it now being fully finished with no need to add anything else.]