Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why doesn't this change the rate of my particle emitter?

Asked by 6 years ago
Edited 6 years ago
function onTouch(part) 
    local humanoid = part.Parent:FindFirstChild("Humanoid") 
    if (humanoid ~= nil) then   
        script.Parent.CFrame = CFrame.new(-5233, 0.5, 129)
        local found = workspace["ModelWithParticleEmitter"]:FindFirstChild("Part")
        if found then
            local particle = found:FindFirstChild("ParticleEmitter")
            if particle then
                particle.Rate = 20000
            end
        end
    end 
end

script.Parent.Touched:connect(onTouch)

I can't figure out why "particle.Rate = 20000" doesn't change the rate of the particle emitter

1 answer

Log in to vote
0
Answered by 6 years ago

I think on your last line you forgot to put in a (function() but I could be wrong.

Ad

Answer this question