Where would I put the particle emitters speed in this part of a script? (fountain.Speed)
local prevValue = nil;
local function Update()
local fountain = game.Workspace.Fountain.cannon.core.fountain
local speed = fountain.Speed
local absPosition = script.Parent.Bar.AbsolutePosition.X;
local absSize = script.Parent.Bar.AbsoluteSize.X;
local mouseDelta = math.min(math.max(0, mouse.X - absPosition), absSize);
local value = script.Parent.MinValue.Value + ((mouseDelta / absSize) * (script.Parent.MaxValue.Value - script.Parent.MinValue.Value));
knob.Position = UDim2.new((mouseDelta / absSize) - .05, knob.Position.X.Offset, knob.Position.Y.Scale, knob.Position.Y.Offset);
if (prevValue ~= nil and math.floor(prevValue) ~= math.floor(value)) then
valueChangedEvent:Fire(prevValue, math.floor(value));
prevValue = math.floor(value);
else
prevValue = math.floor(value);
end
end
Where would I put it so it changes the value of the particle’s speed?