The explosion effect of throwing dynamite is not shown

Local Script:

local uis = game:GetService("UserInputService")
local tool = script.Parent
local anim = tool:WaitForChild("Throw")
local track = nil
local event = tool:WaitForChild("ThrowingEvent")
local equipped = false
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local animator = hum:FindFirstChild("Animator") or Instance.new("Animator", hum)
local track = animator:LoadAnimation(anim)

local function throw()
	print("local function")
	wait(0.5)
	event:FireServer()
end

uis.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		track:Play()
	end
	
	if input.UserInputType == Enum.UserInputType.Touch then
		track:Play()
	end
end)


mouse.Button1Down:Connect(throw)

Script:

local tool = script.Parent
local event = script.Parent:WaitForChild("ThrowingEvent")
local debris = game:GetService("Debris")

event.OnServerEvent:Connect(function(player)
	local dynamite = tool.Handle:Clone()
	dynamite.Parent = workspace
	dynamite.CanCollide = true
	local char = player.Character or player.CharacterAdded:Wait()
	local hrp = char:WaitForChild("HumanoidRootPart")
	local dir = hrp.CFrame.LookVector + hrp.CFrame.UpVector
	dynamite.VectorForce.Force = dir * 10
	tool:Destroy()
	wait(0.2)
	dynamite.VectorForce.Enabled = false
	wait(1.5)
	dynamite.ExploseSound:Play()
	
	local vfx = workspace.Explosion_1:Clone()
	vfx.Parent = workspace.vfx
	vfx.Position = dynamite.Position
	vfx.Anchored = true
	dynamite.Transparency = 1
	dynamite.Anchored = true
	dynamite.CanCollide = false
	debris:AddItem(dynamite, 2.2)
	
end)

Снимок экрана 2023-06-27 в 11.27.45

So as you can see I throw dynamite, but there is no vfx. Why?

1 Like

You did .Transparency =1, you should do .Transparency = 0 instead

so this is dynamite, and it is not a vfx. And as if I made dynamite transparency 1 nothing has changed. After all, I have a problem with vfx, not dynamite