How do I make a particle emit from a basic gun?

How do i make a particle emit from the place where I click on a basic gun?

Script1:
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, target)
script.Parent.Handle.Fire:Play()
if target.Parent:FindFirstChild(“Humanoid”) then
target.Parent.Humanoid:TakeDamage(20)
if target.Parent:Isa(“Part”) then
target.Parent.Humanoid:TakeDamage(20)
end
end
end)

(Local) Script2:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()
local target = mouse.Target
if target.Parent:FindFirstChild(“Humanoid”) then
script.Parent.RemoteEvent:FireServer(target)
local ImpactPaticle = script.Parent.ImpactParticle:Clone()
ImpactPaticle.Parent = target
ImpactPaticle.Enabled = true
wait(0.1)
ImpactPaticle:Destroy()
end
end)

1 Like

its most likely because the impact particle is not positioned so it is automatically set either its original position before it was cloned or in the center of the targert

1 Like