im trying to make a remote event where it will clone a part and emit all the partciles inside of it, but it does nothing, the part is being cloned, and i can manually emit the particle using a pluging, but the code isnt emiting
local skill = game.ReplicatedStorage.Skills.Wind
local event = skill.Fskill.RemoteEvent
local debris = game:GetService("Debris")
local runservice = game:GetService("RunService")
event.OnServerEvent:Connect(function(player)
local character = player.Character
local root = player.Character:FindFirstChild("HumanoidRootPart")
local mark = skill.Fskill.Dash:Clone()
mark.Parent = workspace.Ignore
mark.CFrame = root.CFrame - Vector3.new(0, 1, 0)
local function onStep()
for i, v in mark:GetDescendants() do
if v:IsA("ParticleEmitter") then
local emition = tonumber(v:GetAttribute("EmitCount"))
print(emition)
print(v.Name)
v:Emit(emition)
end
end
end
onStep()
debris:AddItem(mark, 10)
this is just part of the script, thats why doesnt have “end)” at the end
here is the hole script if u want to see if there is any other error there
local skill = game.ReplicatedStorage.Skills.Wind
local event = skill.Fskill.RemoteEvent
local debris = game:GetService("Debris")
local runservice = game:GetService("RunService")
event.OnServerEvent:Connect(function(player)
local character = player.Character
local root = player.Character:FindFirstChild("HumanoidRootPart")
local mark = skill.Fskill.Dash:Clone()
mark.Parent = workspace.Ignore
mark.CFrame = root.CFrame - Vector3.new(0, 1, 0)
local function onStep()
for i, v in mark:GetDescendants() do
if v:IsA("ParticleEmitter") then
local emition = tonumber(v:GetAttribute("EmitCount"))
print(emition)
print(v.Name)
v:Emit(emition)
end
end
end
onStep()
debris:AddItem(mark, 10)
local speed = Vector3.new(100, 70, 100)
local force = 100000
local dash = Instance.new("BodyVelocity")
dash.Parent = root
dash.Name = "Dash"
local direction = root.CFrame.LookVector + Vector3.new(0, 1, 0)
dash.MaxForce = Vector3.new(force, force, force)
dash.Velocity = direction * speed
debris:AddItem(dash, 0.1)
local humanoid = character.Humanoid
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://17436039258"
animation.Parent = character
local animationgo = humanoid:LoadAnimation(animation)
animationgo.Priority = Enum.AnimationPriority.Action
animationgo.Looped = false
animationgo:Play()
debris:AddItem(animation, 5)
end)
I’m still looking through your code, in the meantime can you make sure that mark is in the correct position and make sure that the particles aren’t transparent? I’m trying to reproduce this bug myself but haven’t yet
Does it emit if you use .Enabled? Only other thing I can think of would be the particles being parented wrong or something about the particles getting stuck at like 0,0,0, but I don’t think that’s the case as whatever plugin you’re using seems to work fine
Removing the function wasn’t my attempt for the solution, it was a suggestion for code cleanliness. My attempted solution was by trying particleEmitter.Enabled = true.
Okay, so you use particleEmitter.Enabled and it didn’t work, first of all, may I know your graphics level? Also can I know how long did you have the emitter on for? This can be a bug with your graphics level as if you are using a graphics level of 1 then (almost) no particle emitter would work.
i think the problem isnt like its stuck on 0,0,0 because when i do the dash in the air it also shows nothing, and the .enable is already on but still not working
On the video my graphic lvl is 5, when i change to max it shows no changes.
The emitter is on the world for 10 seconds, the lifetime of the particles are like 0.5, but i still can see normaly, if i do the particles live longer it changes nothing
I see, this is quite an odd case? Try doing this with a default roblox particle emitter with your set lifetime of 0.5 to see if its an issue with all particle emitters or not. It could be that the particle emitters image takes time to load?
Emitting right after the mark clone is Parented doesn’t provide clients enough time to receive those parts before the instruction to emit particles arrives. This is affected by client ping and the server would have to considerably delay the :Emit() in hope that clients have received the mark in time. You should probably handle the emission on clients in this case. You can still parent it and keep the other stuff, just make clients simulate the emissions for themselves once they notice a relevant model of ParticleEmitters (like mark) appearing under the Workspace.Ignore Instance you’ve set up.