Hi I’m trying to get an attachment called particles and I have tried variables, waitforchild, findfirstchild, even just normal “instance.instance” but I either get particles is not a member of instance or infinite yield of particles somebody please help this is my code: local repStorage = game:GetService(“ReplicatedStorage”)
local runService = game:GetService(“RunService”)
local Debris = game:GetService(“Debris”)
repStorage.Fireball.OnServerEvent:Connect(function(player, mouse)
local char = player.Character
local fireBlast = repStorage.Fireblast:Clone()
fireBlast.Parent = workspace.Ignore
fireBlast.CFrame = char.HumanoidRootPart.CFrame
local connection
local startTime = os.clock()
connection = runService.Heartbeat:Connect(function(dt)
fireBlast.CFrame = CFrame.new((fireBlast.Position)+mouse.LookVector*dt*60)
if os.clock() >= startTime+3 then
connection:Disconnect()
fireBlast:Destroy()
local particles = fireBlast:WaitForChild("Particles")
for i, v in pairs(particles:GetChildren()) do
v.Enabled = false
end
Debris:AddItem(fireBlast, 3)
return
end
end)
end)
I can provide my other scripts if needed. I am using a tool that enables a remote event.