I have this script where it creates a particle, but it prints this error "hitpart is not a valid member of ParticleEmitter “Workspace.Part.hitpart” "
When I print the class name tho, it says its a ParticleEmitter. (contradicting itself???)
Here is the code
coroutine.wrap(function()
local HitParticle = Instance.new("Part")
HitParticle.Parent = game.Workspace
local Particle = script.hitpart:Clone()
print(Particle.ClassName) -- Prints Particle Emitter
Particle.Parent = HitParticle
HitParticle.Position = result.Position
HitParticle.CFrame = CFrame.new(result.Position, result.Position + result.Normal)
Particle.hitpart:Emit(40)
wait(0.25)
HitParticle:Destroy()
end)()

I don’t know why this is happening, is it a studio bug?