local swingSound = createSound(tool.Handle, properties.SoundProperties, properties.SwingSoundID)
createPitchShift(swingSound, rng:NextNumber(properties.PitchShiftOctaves.Min, properties.PitchShiftOctaves.Max) )
swingSound:Play()
swingSound.Ended:Connect(function()
swingSound:Destroy()
end)
task.wait(properties.SwingCooldown + properties.AnimationDuration)
swinging = false
end)
Not really sure why I’m getting an error on this 2nd line of code. Says 'attempt to index function with ‘NextNumber’ but it is a number so I don’t know why it doesnt work