CirclePartModule- A module to help create cool rock circle effects

Hello! I am presenting to you CirclePartModule, a module to help you easily create circle rock effects.

This module was created by me using a youtubers script and I eventually started modifying it to be a lot mar customizable and useful(original video: How to make your first VFX for Roblox Part 2! - YouTube) This module has 10 different customizations to make a unique and cool effect.

How to use

Rockmodule.new(part, size1, size2, distx, disty, distz, shape, axis, raybool, timetilldes, howmanyrocks)
The part is what the rock circle is gonna be based around. It is most commonly used with a HumanoidRootPart.

The next is size1, and size2. These are the arguments to randomize the size of the rocks.

The next are the distance between the circle and the part. distx, the distance on the x axis, disty, distance on the y axis, distz, the distance on the z axis.

Shape is the shape that the parts will be. It currently only accepts “Ball”, “Block” and “Cylinder”, and any part instance of your choice. If you do not fill out the argument, it will default to Block.Next one is the axis that the circle is going to be on. It accepts “X”, “x”, “Y”, “y”, “Z”, “z”.

Next one is the raybool, which if true will make it so that the part’s material and color will be that of the ground beneath it9or whatever the recast hits beneath it).

Next Is the timetilldes. This is how long the ring will last until it gets destroyed.

The next one is Tweenargs. This takes a a table that can be created by using module.newinfo(goals, tweeninfo)
This tween is the one played before the rock is destroyed

howmanyrocks is how many rocks in the circle.

RockScript - Roblox

Link: CirclePartModule - Roblox

example:


Code for example:

local RockModule = require(game.ServerScriptService.PartCircleModule)

game.ReplicatedStorage.Move.OnServerEvent:Connect(function (player)

local hum = player.Character.HumanoidRootPart

RockModule.new(hum, 3, 3, 0, 0, 0, "Block", "Y", false, 10)

end)

I hope you guys find this module useful and let me know any feedback you may have. Also give me some more ideas on features for this module!

18 Likes

Some moves I did with this module:

https://gyazo.com/d02c0dd3c8dbd99f3cb73ae57eb1f73e
code:

game.ReplicatedStorage.Move.OnServerEvent:Connect(function (player)
	local humrp = player.character.HumanoidRootPart
	module.new(humrp, 2,4, 0, 0, 1, "Block", "Z")-- 2 ,4, 1
	module.new(humrp, 6,8, 0, 0, 8, "Block", "Z")-- 6, 8, 8
	module.new(humrp, 9, 14, 0, 0, 12, "Block", "Z")-- 9, 14, 12
	module.new(humrp, 14, 20, 0,0,30, "Block", "Z")--14, 20, 30
end)

using textures:

Magic:

Ice:

https://gyazo.com/af7c09d746a828791ba18deff4da4aaf

4 Likes

Sorry if I missed something obvious but is there a particular reason for line 28 to exist

local raybool = raybool or true

After I removed the line the rocks begun actually mimicking the ground color

1 Like

its so you can change whether or not you want the rocks to mimic the color, that just means that if you don’t fill out the argument its automatically placed to true. Its the second to last argument: Rockmodule.new(part, size1, size2, distx, disty, distz, shape, axis, raybool, timetilldes)
for example putting it to true will enable it, and putting it to false will disable it.

I guess there was something wrong with the code, and deleting will make it work fine. I updated the module for any other people who experience this problem

New update: Added custom tween support: https://gyazo.com/9a15a810c4a076cb0ff7f16b0f728451

To use this, do module.newinfo(goals, tweeninfo) goals being a goals table, and tweeninfo being a tweeninfo.

simply put this at the last argument: Rockmodule.new(part, size1, size2, distx, disty, distz, shape, axis, raybool, timetilldes, tweenargs).

This tween will be the tween the rock performs before it is destroyed.

code for circle in video:

local hum = player.Character.HumanoidRootPart
RockModule.new(hum, 3, 3, 0, 0, 0, "Block", "Y", true,  4, RockModule.newinfo({Position = hum.Position - Vector3.new(0, 20, 0)}, TweenInfo.new(1)))
1 Like

Being able to choose how many rocks in the circle is now implemented: Rockmodule.new(part, size1, size2, distx, disty, distz, shape, axis, raybool, timetilldes, howmanyrocks)

Definitely reduces a lot of work time on some special effects. Neat module!

1 Like

Hey, your module is great! But the problem is, whether you make the horizontal effect or not, the raybool will still get the material and color of the ground. If I want to create a circle on the wall, but one side of the wall is brick and another is plank, I will get the material of the ground, which makes no sense.So it would be much better if you add the raybool for every axis separately.

1 Like

This is extremely laggy is this happening to just me?

1 Like

Do you think you can send a video of the lag? That would be much appreciated

sorry for thread bumping, but i wanna know how to make the “radius” of the circle bigger, thanks

i made this after using this and disliking it i annotated it for a youtube vid it should help and be more efficient anything needed lmk

--HAVE THIS IN A SCRIPT THEN TO USE IT SAY RayCastEffect(hrp) when the remote fires or whatveer
function RayCastEffect(hrp) -- the epic function of raycast
	local RayParams = RaycastParams.new() -- paramaters of raycast makes new params
	RayParams.FilterDescendantsInstances = {workspace.DebrisFolder} -- makes the new thingys go to the folder you made so its "neat"
	RayParams.FilterType = Enum.RaycastFilterType.Blacklist -- self explanatory
 
	local angle = 0 -- beginnerrr angle 
 
	for i = 1, 15 do  --- 15 can change its the number of rox you want 15 is nice for a small circle 30 is nice for a bigger one 45 is nice for a bigger one and so on go up by 15 so complete
		local size = math.random(2, 2.5) -- the size, dont make a huge difference between so it doesnt look weird, this is nice size cuz thers variation but not a lot
		local part = Instance.new("Part") -- creates a part
		part.Anchored = true -- anchored this part aint going no where
		part.CanCollide = false -- i dont wanna bang into my part. Messes up the tp -- if you want to be able to hit the part then make this true
		part.Size = Vector3.new(1, 1, 1) -- initial size
		part.CFrame = hrp.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(angle), 0) * CFrame.new(5, 0, 0) -- crzy stuff basically stole from devforum but basically 5 is the diamater of the circle
		-- 5 is how wide you want it to be
		-- the bigger the number is the bigger the circle
 
		game.Debris:AddItem(part, 3.5) -- adds the item "part" for 3.5 secs
 
		local RayCast = workspace:Raycast(part.CFrame.p, part.CFrame.UpVector *- 10, RayParams) -------- the  raycast diamater of 10 more accurate less etc
 
		if RayCast then  -- if raycast is there for that
			part.Position = RayCast.Position -- position is in raycast position
			part.Material = RayCast.Instance.Material -- material is raycast material
			part.Color = RayCast.Instance.Color -- colorr is raycast coloor
			part.Size = Vector3.new(size, size, size) -- size from above 
			part.Orientation = Vector3.new(math.random(-180, 180), math.random(-180, 180), math.random(-180, 180)) -- random angles so they all look like me, disorientated.
			part.Parent = workspace.DebrisFolder -- pls use the debris folder its better trust.
 
			local Tween = ts:Create(part, TweenInfo.new(.25, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut), {Position = part.Position + Vector3.new(0, 1, 0)}):Play() -- creates a tweenn
			delay(2.5, function() -- delay should be 1- the number you put in debris add item i put 3.5 so 3.5-1 = 2.5
				local tween = ts:Create(part, TweenInfo.new(1), {Transparency = 1, Position = part.Position + Vector3.new(0, -5, 0)}):Play() -- nother tweennn
 
			end)
		end
		angle += 25 -- the anglee
	end
end
 `
2 Likes