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.
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.
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.