.Hit not working, if you solve my problem you get +100 social credits

Ohh explosion then change it to Hit and see if it works

dd not work


Thats odd

can’t you like, create a part that is the same size of the explosion?

Ya lol I was thinking of doing that, I just want to do the explosion thing because idk

oh i have an idea, make it bigger when it touches something, which mimics the damage thingy, no need to get new stuf

actuallys thats a good idea. I can change the look of the fireball and make it go larger.

Still would rather do the normal explosion

i assume boom is a part

	boom.Hit:connect(function(hit) 
boom.size = --ur size
			if  hit  ~= nil and hit.Parent:FindFirstChild('Humanoid') and hit.Parent ~= player.Character and hit.parent  ~= nil  then

				local humanoid1 = hit.Parent:FindFirstChild('Humanoid')
				humanoid1:TakeDamage(50)


			end
		end)

you can delete it afterwards

boom is an explosion


I thought you meant the fireball get bigger

This is better than explosion hit detection: GetPartBoundsInRadius

1 Like

not really, i ment the invisible hitbox

There is no invisible hitbox.


what so its just an explosion with no parents? surely it have one, if there is one make it the hitbox

The parent of the explosion is the fireball.

ye so the fireball’s parent can get bigger…fireball’s parent is a part right??? anyways it can go invisble and stuff and go big and do damage, i wouldn’t use an effect to do damage if i were you, but i suppose if it works im fine iwth it

fireball’s parent is the hrp


Do something like this:

local Fireball = workspace.Part --Make this the fireball

local CanExplode = true
Fireball.Touched:Connect(function()
	if not CanExplode then
		return
	end
	CanExplode = false
	local Parts = workspace:GetPartBoundsInRadius(Fireball.Position, 15)
	local HitCharacters = {}

	for _, Part in ipairs(Parts) do
		local Character = Part.Parent
		local Humanoid = Character:FindFirstChildOfClass("Humanoid")
		if not Humanoid or table.find(HitCharacters, Character) then
			continue
		end
		table.insert(HitCharacters, Character)
		Humanoid:TakeDamage(50)
	end
end)

give me social credit :flushed:
Maybe try debugging each line? Also, add some else’s, and print something if it fails that if test.

here this is the full script, maybe it will help

local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
local canshoot = true

local boom = Instance.new("Explosion")
boom.BlastRadius = 3
function OnActivation()

	if canshoot == true then
		canshoot = false
		print('Activation works')
		local ball = Instance.new("Part")
		ball.Shape = Enum.PartType.Ball
		ball.Color = Color3.new(1, 0.333333, 0)
		ball.Size = Vector3.new(2,2,2)
		ball.Material = Enum.Material.Granite
		ball.CanCollide = false

		local fire = Instance.new("Fire")
		fire.Parent = ball
		ball.Parent = root

		local newCFrame = root.CFrame
		local cf = ball.CFrame

		ball.CFrame = newCFrame


		local Velocity = Instance.new("BodyVelocity")

		Velocity.maxForce = Vector3.new(math.huge, math.huge, math.huge) 
		Velocity.Velocity = ball.CFrame.lookVector * 30


		Velocity.Parent = ball




		ball.Touched:connect(function(hit) 
			if hit.Parent:FindFirstChild('Humanoid') and hit.Parent ~= player.Character then
				local humanoid1 = hit.Parent:FindFirstChild('Humanoid')
				humanoid1:TakeDamage(50)

				boom.Parent = ball
				boom.Position = ball.Position

				boom.BlastPressure = 500
				boom.BlastRadius = 300
				boom.ExplosionType = "NoCraters"
				boom.DestroyJointRadiusPercent = 0

				ball.CanCollide = false
				ball.CanTouch = false
				ball.Transparency = 1
				fire:Destroy()
				
				local sound = script.Parent.BallBoom
				sound:Play()

			end
		end)

		boom.Hit:connect(function(hit1) 
			print("EXPLOSION WORKS1")
			if   hit1.Parent:FindFirstChild('Humanoid') and hit1.Parent ~= player.Character and hit1:IsA("Part")  then
				print("EXPLOSION WORKS 2")
				local humanoid1 = hit1.Parent:FindFirstChild('Humanoid')
				humanoid1:TakeDamage(50)



			end
		end)
		boom.Touched:Connect(function(hit) 
			local human = hit.Parent:FindFirstChildOfClass('Humanoid') 
			if human ~= nil and hit:IsDescendantOf(player.Character) == false  then
				human:TakeDamage(50)
			end
		end)
		
		
		ball.Touched:connect(function(hit) 
			if hit:IsA("Part")  and hit.Parent ~= player.Character then
				local boom = Instance.new("Explosion")
				boom.Parent = ball
				boom.Position = ball.Position

				boom.BlastPressure = 500
				boom.BlastRadius = 3
				boom.ExplosionType = "NoCraters"
				boom.DestroyJointRadiusPercent = 0

				ball.CanCollide = false
				ball.CanTouch = false
				ball.Transparency = 1
				fire:Destroy()
				local sound = script.Parent.BallBoom
				sound:Play()

			end

		end)
		wait(1)
		canshoot = true

	end

end


tool.Activated:Connect(OnActivation)

It can’t damage if it’s in a local script!

1 Like