Using Part as particles if physics

  1. Hi, I’m trying to make explosion particles using part, like this video.

the guy that made this video is a youtuber called “just Amos”

  1. I already tried looking up the name of this particle style, but i don’t find nothing about (I’m referring to when the lightning strikes, it releases several small blocks that bounce and then disappear) I want to use script and module script to do this effect, I’m thinking more or less like this for the scripts

SCRIPT:

local Module = require(script.Module)
local rv= game.Player.LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position

task.wait()

local Model= Module.CreatePartsEffect(rv, 10) --- rv is to get position, 10 is the numbers of parts that gonna have in the explosion effect
game.Debris:AddItem(Model, 3)

MODULE:

local module= {}
module.CreatePartsEffect = function(Postin, NumberOfParts)
	local ModelPart = Instance.new("Model", game.Workspace.DebrisFolder)
	for i = 0,NumberOfParts do
		local toGo = Vector3.new(math.random(-12, 12),math.random(1, 10),math.random(-12, 12))
		if i == 0 or i == NumberOfParts then
			toGo = Vector3.new(0,0,0)
		end
		local Part = Instance.new("Part", ModelPart)
		Part.Anchored = false
		Part.CanCollide = true
		Part.Size = Vector3.new(.5,.5,.5)
		Part.Position =  Postin
	end
return ModelPart
end

return module

I didn’t think straight how to make the part fly to random sides I just did the toGo to determine where the part can go, I don’t know very well about this subject but my idea was to put a Body Velocity, but I don’t know how to do that.

thanks :>

obs: I probably won’t be able to answer because my grandma asked me for help, forgive me if I take 1 day to answer

2 Likes

Body velocity is probably the best bet but I have never used them and hence aren’t experienced with them either. Alternatively, you can use AssemblyLinearVelocity (the successor of Velocity)

local module= {}
module.CreatePartsEffect = function(Postin, NumberOfParts)
	local ModelPart = Instance.new("Model", game.Workspace.DebrisFolder)
	for i = 0,NumberOfParts do
		local toGo = Vector3.new(math.random(-12, 12),math.random(1, 10),math.random(-12, 12))
		if i == 0 or i == NumberOfParts then
			toGo = Vector3.new(0,0,0)
		end
		local Part = Instance.new("Part", ModelPart)
		Part.Anchored = false
		Part.CanCollide = true
		Part.Size = Vector3.new(.5,.5,.5)
		Part.Position =  Postin
        Part.AssemblyLinearVelocity = toGo
	end
return ModelPart
end

return module
1 Like

hi soo i try this but dont work

can some one help me pwese ;( i think

Can some one help me please, this is important for meeeee ;>

this is how your module should look:

local particles= {}

particles.__index = particles

function particles.new(Parent, Position, Amount, Spread, Size)
for i = 0,Amount do
local toGo = Vector3.new(math.random(0,Spread),math.random(0,Spread),math.random(0,Spread))
local Part = Instance.new(“Part”, Parent)
Part.Anchored = false
Part.CanCollide = true
Part.Size = Vector3.new(Size,Size,Size)
Part.Position = Position
Part.AssemblyLinearVelocity = toGo
end
end

return particles

in server script:

local particles = require(game.ReplicatedStorage.a)

while task.wait(4) do
particles.new(workspace,workspace.Part.Position,15,9,1)
end

I recommend looking for for 3d particles

dam bro sorry for my lazy low speed to answer, but where i the script that you made for server script

hey bro sorry now i fix it but its look lazy like, my expected function is to the blocks jump and go to random directions how i make it