How can I do something like this?

So I’m making a brick battle game on Roblox, and for my bombs I want them to work similarly to how they are in Super Doomspire. An example is this random video I’ll use as an example for now.

With the basic Roblox explosion instance, it just kind of blasts you and makes your character platform stand anywhere, but in Polyhex’s Super Doomspire it’s so fluid and smooth and the direction is predictable.

How should I go about achieving a similar result?

1 Like

Using the Explosion.Hit event and then checking for a player might work.
As for the “flying smoothly in the air part” I’d just use the assemblylinearvelocity thingy on the humanoidrootpart that can make a part go super fast in one direction.

1 Like

This doesn’t really help with anything nor does it explain why I should check the player, but I’ll try out assembly linear velocity.

1 Like

You need to check if a player is hit by an explosion, right? This is what we use the explosion.hit event for.
Here is an example of what I did, so you might get an idea.

local replicatedstorage = game:GetService("ReplicatedStorage")


replicatedstorage.RemoteEvent.OnClientEvent:Connect(function(pos : Vector3)
	
	local grenade = replicatedstorage.grenade:Clone()
	grenade.Position = pos
	grenade.Parent = workspace
	
	
	task.wait(3)
	local explosion = Instance.new("Explosion")
	explosion.Position = grenade.Position
	explosion.DestroyJointRadiusPercent = 0
	explosion.BlastRadius = 7
	explosion.BlastPressure = 0
	explosion.Parent = workspace
	
	
	grenade:Destroy()
	
	
	explosion.Hit:Connect(function(hit : BasePart)
		
		local Humanoid : Humanoid = hit.Parent:FindFirstChild("Humanoid")
		
		if Humanoid then
			hit.Parent.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(0,200,0)
		end
	end)
end)

Important note!!: This script has not been debugged in any way.

2 Likes

Did it solve your issue? Or is there anything else that you are wondering about?

I’m currently working on something else atm, but I will check this out when I am done.